Skip to content

Commit

Permalink
fix: Update tests for terms of use
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalch committed Aug 7, 2024
1 parent c37bfbb commit d3a92cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckanext/switzerland/tests/test_helpers_terms_of_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@

class TestHelpers(object):
def test_get_resource_terms_of_use_with_license(self):
term_id = 'NonCommercialAllowed-CommercialAllowed-ReferenceRequired'
term_id = 'https://opendata.swiss/terms-of-use#terms_by'
resource = {
"license": term_id
}
result = ogdch_term_utils.get_resource_terms_of_use(resource)
assert_equals(term_id, result)

def test_get_resource_terms_of_use_with_rights(self):
term_id = 'NonCommercialAllowed-CommercialAllowed-ReferenceRequired'
term_id = 'https://opendata.swiss/terms-of-use#terms_by'
resource = {
"rights": term_id
}
result = ogdch_term_utils.get_resource_terms_of_use(resource)
assert_equals(term_id, result)

def test_get_resource_terms_of_use_with_license_and_rights(self):
license_term_id = 'NonCommercialAllowed-CommercialAllowed-ReferenceRequired' # noqa
rights_term_id = 'NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired' # noqa
license_term_id = 'https://opendata.swiss/terms-of-use#terms_by' # noqa
rights_term_id = 'https://opendata.swiss/terms-of-use#terms_ask' # noqa
resource = {
"license": license_term_id,
"rights": rights_term_id
Expand Down

0 comments on commit d3a92cc

Please sign in to comment.