def test_TransactionsByAssetManager(self, mocker): # This test is somewhat fake - but the integration tests are for the bigger picture endpoint = '%s/transactions/%s' % (self.transactions_interface.endpoint, self.asset_manager_id) asset_manager_ids = [self.asset_manager_id] transactions = generate_transactions(asset_manager_ids=asset_manager_ids) mocker.get(endpoint, json=[transaction.to_json() for transaction in transactions]) results = self.transactions_interface.transactions_by_asset_manager(asset_manager_id=self.asset_manager_id) self.assertEqual(results, transactions)
def test_Search(self, mocker): # This test is somewhat fake - but the integration tests are for the bigger picture endpoint = self.transactions_interface.endpoint + '/transactions' asset_manager_ids = [self.asset_manager_id, self.asset_manager_id+1] transactions = generate_transactions(asset_manager_ids=asset_manager_ids) mocker.get(endpoint, json=[transaction.to_json() for transaction in transactions]) all_transactions = self.transactions_interface.search() self.assertEqual(all_transactions, transactions)