def test_Search(self, mocker): # This test is somewhat fake - but the integration tests are for the bigger picture endpoint = '%s/assets' % self.assets_interface.endpoint assets = generate_assets(asset_manager_ids=[self.asset_manager_id]) mocker.get(endpoint, json=[asset.to_json() for asset in assets]) all_assets = self.assets_interface.search(self.asset_manager_id) self.assertEqual(assets, all_assets)
def test_AssetsByAssetManager(self, mocker): # This test is somewhat fake - but the integration tests are for the bigger picture endpoint = '%s/assets/%s' % (self.assets_interface.endpoint, self.asset_manager_id) assets = generate_assets(asset_manager_ids=[self.asset_manager_id]) mocker.get(endpoint, json=[asset.to_json() for asset in assets]) asset_manager_assets = self.assets_interface.assets_by_asset_manager(asset_manager_id=self.asset_manager_id) self.assertEqual(assets, asset_manager_assets)