mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
blackified
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
83318bb484
commit
1fc856c05f
@ -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()
|
||||
|
||||
|
||||
@ -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"),
|
||||
|
||||
@ -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)],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user