Fixed flush_dbtarantool

This commit is contained in:
andrei 2022-05-26 16:07:26 +03:00
parent d4ed0512f9
commit ad6c9926e2
2 changed files with 7 additions and 2 deletions

View File

@ -144,7 +144,7 @@ def _setup_database(_configure_planetmint): # TODO Here is located setup databa
@pytest.fixture
def _bdb(_setup_database, _configure_bigchaindb):
def _bdb(_setup_database, _configure_planetmint):
print(f"BDB CALL")
from planetmint.backend import Connection
from planetmint.transactions.common.memoize import to_dict, from_dict

View File

@ -36,7 +36,12 @@ def flush_tarantool_db(connection, dbname):
_space = connection.space(space_name=s)
_all_data = _space.select([]).data
for _id in _all_data:
_space.delete(_id[0])
if "assets" == s:
_space.delete(_id[1])
elif "abci_chains" == s:
_space.delete(_id[2])
else:
_space.delete(_id[0])
def generate_block(planet):