See #170: cover on tracks and artists

This commit is contained in:
Eliot Berriot 2020-01-17 16:27:11 +01:00
parent db1cb30df8
commit 71b400a9b8
34 changed files with 582 additions and 254 deletions

View file

@ -179,9 +179,10 @@ def test_perm_checkers_can_approve(
assert mutations.can_approve(obj, actor=actor) is expected
def test_mutation_set_attachment_cover(factories, now, mocker):
@pytest.mark.parametrize("factory_name", ["music.Artist", "music.Track", "music.Album"])
def test_mutation_set_attachment_cover(factory_name, factories, now, mocker):
new_attachment = factories["common.Attachment"](actor__local=True)
obj = factories["music.Album"]()
obj = factories[factory_name]()
old_attachment = obj.attachment_cover
mutation = factories["common.Mutation"](
type="update", target=obj, payload={"cover": new_attachment.uuid}