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

@ -63,12 +63,13 @@ def test_db_serialize_update_mutation(factories, mutations_registry, mocker):
user = factories["users.User"](email="hello@test.email", with_actor=True)
class S(mutations.UpdateMutationSerializer):
serialized_relations = {"actor": "full_username"}
class Meta:
model = user.__class__
fields = ["actor"]
def get_serialized_relations(self):
return {"actor": "full_username"}
expected = {"actor": user.actor.full_username}
assert S().db_serialize({"actor": user.actor}) == expected