mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
test_lib.py -> fixed
This commit is contained in:
parent
96472d6bb9
commit
c84acc689a
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (planetmint)" project-jdk-type="Python SDK" />
|
||||
<component name="PyCharmProfessionalAdvertiser">
|
||||
<option name="shown" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
@ -332,12 +332,18 @@ def test_store_one_unspent_output(b, unspent_output_1, utxo_collection):
|
||||
|
||||
@pytest.mark.bdb
|
||||
def test_store_many_unspent_outputs(b, unspent_outputs, utxo_collection):
|
||||
from planetmint.backend.tarantool.connection import TarantoolDB
|
||||
res = b.store_unspent_outputs(*unspent_outputs)
|
||||
# assert res.acknowledged
|
||||
assert len(list(res)) == 3
|
||||
# assert utxo_collection.count_documents(
|
||||
# {'transaction_id': unspent_outputs[0]['transaction_id']}
|
||||
# ) == 3
|
||||
if not isinstance(b.connection, TarantoolDB):
|
||||
assert res.acknowledged
|
||||
assert len(list(res)) == 3
|
||||
assert utxo_collection.count_documents(
|
||||
{'transaction_id': unspent_outputs[0]['transaction_id']}
|
||||
) == 3
|
||||
else:
|
||||
utxo_space = b.connection.space("utxos") # .select([], index="transaction_search").data
|
||||
res = utxo_space.select([unspent_outputs[0]["transaction_id"]], index="transaction_search")
|
||||
assert len(res.data) == 3
|
||||
|
||||
|
||||
def test_get_utxoset_merkle_root_when_no_utxo(b):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user