Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make collection type handling case-insensitive #234

Merged
merged 1 commit into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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