def test_PositionsByAssetManager(self, mocker): # This test is somewhat fake - but the integration tests are for the bigger picture endpoint = '%s/positions/%s' % (self.transactions_interface.endpoint, self.asset_manager_id) positions = generate_positions(asset_manager_ids=[self.asset_manager_id]) mocker.get(endpoint, json=[position.to_json() for position in positions]) results = self.transactions_interface.positions_by_asset_manager(asset_manager_id=self.asset_manager_id) self.assertEqual(positions, results)
def test_PositionSearch(self, mocker): # This test is somewhat fake - but the integration tests are for the bigger picture endpoint = '%s/positions' % self.transactions_interface.endpoint asset_manager_ids = [self.asset_manager_id, self.asset_manager_id+1] positions = generate_positions(asset_manager_ids=asset_manager_ids) mocker.get(endpoint, json=[position.to_json() for position in positions]) all_positions = self.transactions_interface.position_search() self.assertEqual(all_positions, positions)