blackified

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2022-10-27 14:51:24 +02:00
parent 83318bb484
commit 1fc856c05f
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View File

@ -42,7 +42,9 @@ class LocalMongoDBConnection(DBConnection):
)
self.crlfile = _kwargs_parser(key="crlfile", kwargs=kwargs) or dbconf["crlfile"]
self.max_tries = _kwargs_parser(key="max_tries", kwargs=kwargs)
self.connection_timeout = _kwargs_parser(key="connection_timeout", kwargs=kwargs) or dbconf["connection_timeout"]
self.connection_timeout = (
_kwargs_parser(key="connection_timeout", kwargs=kwargs) or dbconf["connection_timeout"]
)
self.__conn = None
self.connect()

View File

@ -5,7 +5,7 @@ import os
# from planetmint.log import DEFAULT_LOGGING_CONFIG as log_config
from planetmint.version import __version__ # noqa
from decouple import config
class Singleton(type):
_instances = {}
@ -27,7 +27,7 @@ class Config(metaclass=Singleton):
# _base_database_localmongodb.keys() because dicts are unordered.
# I tried to configure
self.log_config = DEFAULT_LOGGING_CONFIG
db = config('PLANETMINT_DATABASE_BACKEND', default="tarantool_db")
db = config("PLANETMINT_DATABASE_BACKEND", default="tarantool_db")
self.__private_database_keys_map = { # TODO Check if it is working after removing 'name' field
"tarantool_db": ("host", "port"),
"localmongodb": ("host", "port", "name"),

View File

@ -65,8 +65,9 @@ def test_bigchain_class_default_initialization(config):
@pytest.mark.bdb
def test_get_spent_issue_1271(b, alice, bob, carol):
from planetmint import Planetmint
planet = Planetmint()
print( f" CONNECTION HOST : {planet.connection.host}")
print(f" CONNECTION HOST : {planet.connection.host}")
tx_1 = Create.generate(
[carol.public_key],
[([carol.public_key], 8)],