mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Add db_context fixture
This commit is contained in:
parent
b2584dd0fa
commit
cc069fa640
@ -486,6 +486,19 @@ def db_conn():
|
||||
return connect()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def db_context(db_config, db_host, db_port, db_name, db_conn):
|
||||
DBContext = namedtuple(
|
||||
'DBContext', ('config', 'host', 'port', 'name', 'conn'))
|
||||
return DBContext(
|
||||
config=db_config,
|
||||
host=db_host,
|
||||
port=db_port,
|
||||
name=db_name,
|
||||
conn=db_conn,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mocked_setup_pub_logger(mocker):
|
||||
return mocker.patch(
|
||||
|
Loading…
x
Reference in New Issue
Block a user