mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fix tests
This commit is contained in:
parent
0692fe04d0
commit
ae641d6a96
@ -1,3 +1,4 @@
|
||||
import json
|
||||
from argparse import Namespace
|
||||
from pprint import pprint
|
||||
import copy
|
||||
@ -109,9 +110,7 @@ def test_bigchain_show_config(capsys, mock_file_config):
|
||||
output_config, _ = capsys.readouterr()
|
||||
config['keypair']['private'] = 'x' * 45
|
||||
del config['CONFIGURED']
|
||||
pprint(config)
|
||||
expected_outout_config, _ = capsys.readouterr()
|
||||
assert output_config == expected_outout_config
|
||||
assert output_config.strip() == json.dumps(config, indent=4, sort_keys=True)
|
||||
|
||||
|
||||
def test_bigchain_run_init_when_db_exists(mock_file_config, mock_db_init_with_existing_db):
|
||||
|
@ -120,6 +120,11 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch):
|
||||
|
||||
assert bigchaindb.config == {
|
||||
'CONFIGURED': True,
|
||||
'server': {
|
||||
'bind': '0.0.0.0:9984',
|
||||
'workers': None,
|
||||
'threads': None,
|
||||
},
|
||||
'database': {
|
||||
'host': 'test-host',
|
||||
'port': 4242,
|
||||
@ -135,6 +140,6 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch):
|
||||
'port': 8125,
|
||||
'rate': 0.01,
|
||||
},
|
||||
'api_endpoint': 'http://localhost:8008/api/v1',
|
||||
'api_endpoint': 'http://localhost:9984/api/v1',
|
||||
'consensus_plugin': 'default',
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user