Fix annoying fixture

This commit is contained in:
vrde 2016-02-18 22:14:58 +01:00
parent c695f0950e
commit aea99f8ce0
2 changed files with 3 additions and 4 deletions

View File

@ -12,7 +12,7 @@ from bigchaindb import db
from bigchaindb.exceptions import DatabaseAlreadyExists
from bigchaindb.commands.utils import base_parser, start
from bigchaindb.processes import Processes
from bigchaindb.crypto import generate_key_pair
from bigchaindb import crypto
logging.basicConfig(level=logging.INFO)
@ -52,7 +52,7 @@ def run_configure(args, skip_if_exists=False):
conf = copy.deepcopy(bigchaindb._config)
print('Generating keypair')
conf['keypair']['private'], conf['keypair']['public'] = generate_key_pair()
conf['keypair']['private'], conf['keypair']['public'] = crypto.generate_key_pair()
if not args.yes:
for key in ('host', 'port', 'name'):

View File

@ -52,8 +52,7 @@ def mock_rethink_db_drop(monkeypatch):
@pytest.fixture
def mock_generate_key_pair(monkeypatch):
from bigchaindb import crypto
monkeypatch.setattr(crypto, 'generate_key_pair', lambda: ('privkey', 'pubkey'))
monkeypatch.setattr('bigchaindb.crypto.generate_key_pair', lambda: ('privkey', 'pubkey'))
@pytest.fixture