mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 06:55:45 +00:00
test_store_transaction -> changed to work with tarantool
This commit is contained in:
parent
3b3639b914
commit
9f6ec48919
@ -117,7 +117,7 @@ def get_metadata(connection, transaction_ids: list):
|
||||
|
||||
|
||||
@register_query(TarantoolDB)
|
||||
def store_asset(connection, asset: dict):
|
||||
def store_asset(connection, asset):
|
||||
space = connection.space("assets")
|
||||
convert = lambda obj: obj if isinstance(obj, tuple) else (obj, obj["id"], obj["id"])
|
||||
try:
|
||||
|
||||
@ -188,11 +188,12 @@ def test_store_transaction(mocker, b, signed_create_tx,
|
||||
b.connection,
|
||||
[{'data': signed_create_tx.asset['data'], 'tx_id': signed_create_tx.id, 'asset_id': signed_create_tx.id}]
|
||||
)
|
||||
|
||||
else:
|
||||
mocked_store_asset.assert_called_once_with(
|
||||
b.connection,
|
||||
[{'data': signed_create_tx.asset, 'tx_id': signed_create_tx.id, 'asset_id': signed_create_tx.id}]
|
||||
[(signed_create_tx.asset, signed_create_tx.id, signed_create_tx.id)]
|
||||
)
|
||||
|
||||
mocked_store_metadata.assert_called_once_with(
|
||||
b.connection,
|
||||
[{'id': signed_create_tx.id, 'metadata': signed_create_tx.metadata}],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user