Faster tests by not creating covers unless mandatory

This commit is contained in:
Eliot Berriot 2020-03-23 14:29:01 +01:00
parent 48681c39db
commit c9259c906b
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
22 changed files with 110 additions and 68 deletions

View file

@ -182,7 +182,7 @@ def test_perm_checkers_can_approve(
@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[factory_name]()
obj = factories[factory_name](with_cover=True)
old_attachment = obj.attachment_cover
mutation = factories["common.Mutation"](
type="update", target=obj, payload={"cover": new_attachment.uuid}