Skip to content

Commit

Permalink
Update test_media.py
Browse files Browse the repository at this point in the history
  • Loading branch information
krysal committed Apr 26, 2024
1 parent b36b62d commit 1790189
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions api/test/unit/models/test_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ def test_attribution_handles_missing_title_or_creator(
)
for field in fields:
setattr(obj, field, field_values[field])
setattr(
obj,
"meta_data",
{"license_url": "https://creativecommons.org/licenses/by/3.0/"},
)

assert attribution in obj.attribution
assert (
"To view a copy of this license, "
"visit https://creativecommons.org/licenses/by/3.0/."
) in obj.attribution


@media_type_params
def test_license_url_is_generated_if_missing(media_type, media_model):
obj = media_model(
license="by",
license_version="3.0",
)
assert obj.license_url is not None

0 comments on commit 1790189

Please sign in to comment.