Beispiel #1
0
 def test_add_asset_link(self):
     self.generate_fixture_asset_types()
     self.generate_fixture_asset_character()
     assets_service.add_asset_link(self.asset.id, self.asset_character.id)
     asset = assets_service.get_asset_with_relations(self.asset.id)
     self.assertEqual(asset["entities_out"][0],
                      str(self.asset_character.id))
Beispiel #2
0
 def test_remove_asset_link(self):
     self.generate_fixture_asset_types()
     self.generate_fixture_asset_character()
     assets_service.add_asset_link(self.asset.id, self.asset_character.id)
     assets_service.remove_asset_link(self.asset.id,
                                      self.asset_character.id)
     asset = assets_service.get_asset(self.asset.id)
     self.assertEquals(len(asset["entities_out"]), 0)