mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 22:45:44 +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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (planetmint)" project-jdk-type="Python SDK" />
|
<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>
|
</project>
|
||||||
@ -332,12 +332,18 @@ def test_store_one_unspent_output(b, unspent_output_1, utxo_collection):
|
|||||||
|
|
||||||
@pytest.mark.bdb
|
@pytest.mark.bdb
|
||||||
def test_store_many_unspent_outputs(b, unspent_outputs, utxo_collection):
|
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)
|
res = b.store_unspent_outputs(*unspent_outputs)
|
||||||
# assert res.acknowledged
|
if not isinstance(b.connection, TarantoolDB):
|
||||||
assert len(list(res)) == 3
|
assert res.acknowledged
|
||||||
# assert utxo_collection.count_documents(
|
assert len(list(res)) == 3
|
||||||
# {'transaction_id': unspent_outputs[0]['transaction_id']}
|
assert utxo_collection.count_documents(
|
||||||
# ) == 3
|
{'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):
|
def test_get_utxoset_merkle_root_when_no_utxo(b):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user