Пример #1
0
 def test_basic(self):
     super(TestCollectionWithAddonsSerializer, self).test_basic()
     collection_addon = CollectionAddon.objects.get(
         addon=self.addon, collection=self.collection
     )
     data = self.serialize()
     assert data['addons'] == [CollectionAddonSerializer(collection_addon).data]
     assert data['addons'][0]['addon']['id'] == self.addon.id
Пример #2
0
 def serialize(self):
     return CollectionAddonSerializer(self.item).data