test_bigchain_api

This commit is contained in:
andrei 2022-05-06 17:41:20 +03:00
parent 0cfbaebd42
commit 6e78ca5287
2 changed files with 6 additions and 2 deletions

View File

@ -143,7 +143,6 @@ def get_asset(connection, asset_id: str):
space = connection.space("assets")
_data = space.select(asset_id, index="txid_search")
_data = _data.data
print(f"ASSSSSSET :: {_data} ::")
return _data[0][0] if len(_data) > 0 else []

View File

@ -2,7 +2,7 @@
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import warnings
from unittest.mock import patch
import pytest
@ -62,6 +62,11 @@ class TestBigchainApi(object):
def test_text_search(self, b, alice):
from planetmint.models import Transaction
from planetmint.backend.tarantool.connection import TarantoolDB
if isinstance(b.connection, TarantoolDB):
warnings.warn(" :::::: This function is used only with :::::: ")
return
# define the assets
asset1 = {'msg': 'Planetmint 1'}