mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
end day commit
This commit is contained in:
parent
516084bf58
commit
9b335cdbfc
@ -255,7 +255,7 @@ def _remove_text_score(asset):
|
||||
|
||||
|
||||
# @register_query(LocalMongoDBConnection)
|
||||
def get_owned_ids(connection, owner: str):
|
||||
def get_owned_ids(connection, owner: str): # FIXME LAST HERE
|
||||
space = connection.space("keys")
|
||||
_keys = space.select(owner, index="keys_search", limit=1)
|
||||
if len(_keys.data) == 0:
|
||||
|
||||
@ -211,13 +211,14 @@ def test_get_metadata():
|
||||
|
||||
|
||||
def test_get_owned_ids(signed_create_tx, user_pk):
|
||||
from planetmint.backend import connect, query
|
||||
conn = connect()
|
||||
from planetmint.backend import connect
|
||||
from planetmint.backend.tarantool import query
|
||||
conn = connect().get_connection()
|
||||
|
||||
# insert a transaction
|
||||
conn.db.transactions.insert_one(deepcopy(signed_create_tx.to_dict()))
|
||||
query.store_transactions(connection=conn, signed_transactions=[signed_create_tx.to_dict()])
|
||||
|
||||
txns = list(query.get_owned_ids(conn, user_pk))
|
||||
txns = list(query.get_owned_ids(connection=conn, owner=user_pk))
|
||||
|
||||
assert txns[0] == signed_create_tx.to_dict()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user