Skip to content

Commit

Permalink
Make collection type handling case-insensitive (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbylicki authored May 6, 2020
1 parent e5a62a5 commit ff33c34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ h11==0.8.1
httptools==0.1.1
jinja2==2.11.2
MarkupSafe==1.1.1
robotframework==3.1.2
robotframework==3.2.1
SQLAlchemy==1.3.16
uvicorn==0.11.5
uvloop==0.14.0
Expand Down
2 changes: 1 addition & 1 deletion rfhub2/cli/keywords_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def _collection_path_and_name_match(
def _library_or_resource_changed(
new_collection: CollectionUpdateWithKeywords, existing_collection: Collection
) -> bool:
if new_collection.collection.type == "library":
if new_collection.collection.type.lower() == "library":
return new_collection.collection.version != existing_collection.version
else:
return (
Expand Down
2 changes: 1 addition & 1 deletion rfhub2/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "0.18"
version = "0.19"
14 changes: 7 additions & 7 deletions tests/unit/cli/keywords_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"doc": "Documentation for library ``Test Libdoc File``.",
"doc_format": "ROBOT",
"name": "Test Libdoc File",
"scope": "global",
"scope": "GLOBAL",
"type": "library",
"version": "3.2.0",
"keywords": [{"name": "Someone Shall Pass", "args": '["who"]', "doc": ""}],
Expand Down Expand Up @@ -68,8 +68,8 @@
doc_format="ROBOT",
name="SingleClassLib",
path=str(FIXTURE_PATH / "SingleClassLib" / "SingleClassLib.py"),
scope="test case",
type="library",
scope="TEST",
type="LIBRARY",
version="1.2.3",
)

Expand Down Expand Up @@ -113,8 +113,8 @@
doc_format="ROBOT",
name="Test Libdoc File",
path=str(FIXTURE_PATH / "test_libdoc_file.xml"),
scope="global",
type="library",
scope="GLOBAL",
type="LIBRARY",
version="3.2.0",
)
EXPECTED_COLLECTION_KEYWORDS_2_1 = KeywordUpdate(
Expand Down Expand Up @@ -440,9 +440,9 @@ def test_get_all_collections_should_return_all_collections(self):
"id": 1,
"name": "SingleClassLib",
"keywords": [],
"type": "library",
"type": "LIBRARY",
"doc_format": "ROBOT",
"scope": "test case",
"scope": "TEST",
"version": "1.2.3",
"path": str(
FIXTURE_PATH / "SingleClassLib" / "SingleClassLib.py"
Expand Down

0 comments on commit ff33c34

Please sign in to comment.