Skip to content

Commit

Permalink
Apply changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed May 2, 2023
1 parent a2ff27d commit 6a749c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions catalog/tests/dags/common/licenses/test_licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ def test_get_valid_cc_url_nones_missing_url(mock_rewriter):
assert actual_url is None


def test_get_valid_cc_url_rewrites_urls_from_special_cases():
actual_url = licenses._get_valid_cc_url(
"https://creativecommons.org/share-your-work/public-domain/cc0/"
)
assert actual_url == "https://creativecommons.org/publicdomain/zero/1.0/"


def test_get_valid_cc_url_uses_rewritten_url(monkeypatch):
expected_url = "https://creativecommons.org/licenses/licenses/by/1.0/"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ def test_get_data_from_response(resource_name, expected):
assert actual == expected


def test_docstring_example():
json_func_ex = make_resource_json_func("brooklynmuseum")
json_dict = json_func_ex("cc_license_info.json")
assert json_dict["public_name"] == "Creative Commons-BY"


@pytest.mark.parametrize(
"batch_objects_name, object_data_name, expected_count",
[
Expand Down

0 comments on commit 6a749c9

Please sign in to comment.