def test_get_license_url_with_multiple_license(): rights_field = [ "http://noncc.org/", "http://creativecommons.org/publicdomain/zero/1.0/" ] expect_license = "http://creativecommons.org/publicdomain/zero/1.0/" assert europeana._get_license_url(rights_field) == expect_license
def test_get_license_url_with_non_cc_license(): rights_field = ["http://noncc.org/"] assert europeana._get_license_url(rights_field) is None
def test_get_license_url_with_real_example(): rights_field = ["http://creativecommons.org/publicdomain/zero/1.0/"] assert europeana._get_license_url( rights_field) == "http://creativecommons.org/publicdomain/zero/1.0/"