parent
fafdac2523
commit
4740150f6d
|
@ -118,9 +118,8 @@ def _configure_bigchaindb(request):
|
|||
test_db_name = '{}_{}'.format(TEST_DB_NAME, xdist_suffix)
|
||||
|
||||
backend = request.config.getoption('--database-backend')
|
||||
backend_conf = getattr(bigchaindb, '_database_' + backend)
|
||||
config = {
|
||||
'database': backend_conf,
|
||||
'database': bigchaindb._database_map[backend],
|
||||
'keypair': {
|
||||
'private': '31Lb1ZGKTyHnmVK3LUMrAUrPNfd4sE2YyBt3UA4A25aA',
|
||||
'public': '4XYfCbabAWVUCbjTmRTFEu2sc3dFEdkse4r6X498B1s8',
|
||||
|
|
|
@ -23,11 +23,6 @@ def test_bigchain_instance_is_initialized_when_conf_provided(request):
|
|||
|
||||
assert bigchaindb.config['CONFIGURED'] is True
|
||||
|
||||
# set the current backend so that Bigchain can create a connection
|
||||
backend = request.config.getoption('--database-backend')
|
||||
backend_conf = getattr(bigchaindb, '_database_' + backend)
|
||||
bigchaindb.config['database'] = backend_conf
|
||||
|
||||
b = bigchaindb.Bigchain()
|
||||
|
||||
assert b.me
|
||||
|
@ -44,11 +39,6 @@ def test_bigchain_instance_raises_when_not_configured(request, monkeypatch):
|
|||
# from existing configurations
|
||||
monkeypatch.setattr(config_utils, 'autoconfigure', lambda: 0)
|
||||
|
||||
# set the current backend so that Bigchain can create a connection
|
||||
backend = request.config.getoption('--database-backend')
|
||||
backend_conf = getattr(bigchaindb, '_database_' + backend)
|
||||
bigchaindb.config['database'] = backend_conf
|
||||
|
||||
with pytest.raises(exceptions.KeypairNotFoundException):
|
||||
bigchaindb.Bigchain()
|
||||
|
||||
|
|
Loading…
Reference in New Issue