From e9e9243930d2d62548dad74978c4d41fad883311 Mon Sep 17 00:00:00 2001 From: Brian McLaughlin Date: Tue, 8 Aug 2023 15:15:30 -0400 Subject: [PATCH] Add tag for EDA content (#233) Update test to validate entire required tag list Update object comparison per flake8 recommendation Issue: AAH-2584 --- CHANGES/2584.misc | 1 + galaxy_importer/schema.py | 1 + tests/unit/test_schema_collection_info.py | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 CHANGES/2584.misc diff --git a/CHANGES/2584.misc b/CHANGES/2584.misc new file mode 100644 index 00000000..43e4fdf6 --- /dev/null +++ b/CHANGES/2584.misc @@ -0,0 +1 @@ +Add tag for EDA content \ No newline at end of file diff --git a/galaxy_importer/schema.py b/galaxy_importer/schema.py index 797ec5a0..bd7b4e36 100644 --- a/galaxy_importer/schema.py +++ b/galaxy_importer/schema.py @@ -44,6 +44,7 @@ "application", "cloud", "database", + "eda", "infrastructure", "linux", "monitoring", diff --git a/tests/unit/test_schema_collection_info.py b/tests/unit/test_schema_collection_info.py index a3f4b945..01888033 100644 --- a/tests/unit/test_schema_collection_info.py +++ b/tests/unit/test_schema_collection_info.py @@ -20,7 +20,7 @@ from galaxy_importer import config from galaxy_importer import schema -from galaxy_importer.schema import CollectionInfo +from galaxy_importer.schema import CollectionInfo, REQUIRED_TAG_LIST @pytest.fixture @@ -171,9 +171,10 @@ def test_required_tag_enabled(collection_info, temp_config_file): config_data = config.ConfigFile.load() config.Config(config_data=config_data) - collection_info["tags"] = ["application"] - res = CollectionInfo(**collection_info) - assert ["application"] == res.tags + for tag in REQUIRED_TAG_LIST: + collection_info["tags"] = [f"{tag}"] + res = CollectionInfo(**collection_info) + assert [f"{tag}"] == res.tags collection_info["tags"] = ["fail"] with pytest.raises(ValueError, match=r"At least one tag required from tag list: "):