From 6e78ca52872070170c2ba441c5fe51fc1c6dc38f Mon Sep 17 00:00:00 2001 From: andrei Date: Fri, 6 May 2022 17:41:20 +0300 Subject: [PATCH] test_bigchain_api --- planetmint/backend/tarantool/query.py | 1 - tests/db/test_bigchain_api.py | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/planetmint/backend/tarantool/query.py b/planetmint/backend/tarantool/query.py index f79fd03..f92dd87 100644 --- a/planetmint/backend/tarantool/query.py +++ b/planetmint/backend/tarantool/query.py @@ -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 [] diff --git a/tests/db/test_bigchain_api.py b/tests/db/test_bigchain_api.py index 18fadf8..0ac7686 100644 --- a/tests/db/test_bigchain_api.py +++ b/tests/db/test_bigchain_api.py @@ -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'}