Skip to content

Commit

Permalink
Add tag for EDA content (#233)
Browse files Browse the repository at this point in the history
Update test to validate entire required tag list
Update object comparison per flake8 recommendation
Issue: AAH-2584
  • Loading branch information
bmclaughlin authored Aug 8, 2023
1 parent 63936c9 commit e9e9243
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/2584.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add tag for EDA content
1 change: 1 addition & 0 deletions galaxy_importer/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"application",
"cloud",
"database",
"eda",
"infrastructure",
"linux",
"monitoring",
Expand Down
9 changes: 5 additions & 4 deletions tests/unit/test_schema_collection_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: "):
Expand Down

0 comments on commit e9e9243

Please sign in to comment.