diff --git a/link_checker/tests/test_utils.py b/link_checker/tests/test_utils.py index 3d9422d..002953e 100644 --- a/link_checker/tests/test_utils.py +++ b/link_checker/tests/test_utils.py @@ -45,49 +45,49 @@ def test_get_github_legalcode(): license_url_data = [ - # 2 part URL - ( - "by-nc-nd_2.0", - "https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode", - "https://creativecommons.org/licenses/by-nc-nd/2.0/", - "https://creativecommons.org/licenses/by-nc-nd/2.0/rdf", - ), - # 3 part URL - ( - "by-nc-nd_4.0_cs", - "https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.cs", - "https://creativecommons.org/licenses/by-nc-nd/4.0/deed.cs", - "https://creativecommons.org/licenses/by-nc-nd/4.0/rdf", - ), - # 4 part URL - ( - "by-nc-nd_3.0_rs_sr-Latn", - "https://creativecommons.org/licenses/by-nc-nd/3.0/rs/" - "legalcode.sr-Latn", - "https://creativecommons.org/licenses/by-nc-nd/3.0/rs/", - "https://creativecommons.org/licenses/by-nc-nd/3.0/rs/rdf", - ), - # Special case - samplingplus - ( - "samplingplus_1.0", - "https://creativecommons.org/licenses/sampling+/1.0/legalcode", - "https://creativecommons.org/licenses/sampling+/1.0/", - "https://creativecommons.org/licenses/sampling+/1.0/rdf", - ), - ( - "samplingplus_1.0_br", - "https://creativecommons.org/licenses/sampling+/1.0/br/legalcode", - "https://creativecommons.org/licenses/sampling+/1.0/br/", - "https://creativecommons.org/licenses/sampling+/1.0/br/rdf", - ), - # Special case - CC0 - ( - "zero_1.0", - "https://creativecommons.org/publicdomain/zero/1.0/legalcode", - "https://creativecommons.org/publicdomain/zero/1.0/", - "https://creativecommons.org/publicdomain/zero/1.0/rdf", - ), - ] + # 2 part URL + ( + "by-nc-nd_2.0", + "https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode", + "https://creativecommons.org/licenses/by-nc-nd/2.0/", + "https://creativecommons.org/licenses/by-nc-nd/2.0/rdf", + ), + # 3 part URL + ( + "by-nc-nd_4.0_cs", + "https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.cs", + "https://creativecommons.org/licenses/by-nc-nd/4.0/deed.cs", + "https://creativecommons.org/licenses/by-nc-nd/4.0/rdf", + ), + # 4 part URL + ( + "by-nc-nd_3.0_rs_sr-Latn", + "https://creativecommons.org/licenses/by-nc-nd/3.0/rs/" + "legalcode.sr-Latn", + "https://creativecommons.org/licenses/by-nc-nd/3.0/rs/", + "https://creativecommons.org/licenses/by-nc-nd/3.0/rs/rdf", + ), + # Special case - samplingplus + ( + "samplingplus_1.0", + "https://creativecommons.org/licenses/sampling+/1.0/legalcode", + "https://creativecommons.org/licenses/sampling+/1.0/", + "https://creativecommons.org/licenses/sampling+/1.0/rdf", + ), + ( + "samplingplus_1.0_br", + "https://creativecommons.org/licenses/sampling+/1.0/br/legalcode", + "https://creativecommons.org/licenses/sampling+/1.0/br/", + "https://creativecommons.org/licenses/sampling+/1.0/br/rdf", + ), + # Special case - CC0 + ( + "zero_1.0", + "https://creativecommons.org/publicdomain/zero/1.0/legalcode", + "https://creativecommons.org/publicdomain/zero/1.0/", + "https://creativecommons.org/publicdomain/zero/1.0/rdf", + ), +] def id_generator(data): id_list = [] @@ -96,7 +96,9 @@ def id_generator(data): return id_list @pytest.mark.parametrize( - "filename, result, deed_result, rdf_result", license_url_data, ids = id_generator(license_url_data) + "filename, result, deed_result, rdf_result", + license_url_data, + ids=id_generator(license_url_data) ) def test_create_base_link(filename, result, deed_result, rdf_result): args = link_checker.parse_argument([])