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 argparse import Namespace
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
import copy
|
import copy
|
||||||
@ -109,9 +110,7 @@ def test_bigchain_show_config(capsys, mock_file_config):
|
|||||||
output_config, _ = capsys.readouterr()
|
output_config, _ = capsys.readouterr()
|
||||||
config['keypair']['private'] = 'x' * 45
|
config['keypair']['private'] = 'x' * 45
|
||||||
del config['CONFIGURED']
|
del config['CONFIGURED']
|
||||||
pprint(config)
|
assert output_config.strip() == json.dumps(config, indent=4, sort_keys=True)
|
||||||
expected_outout_config, _ = capsys.readouterr()
|
|
||||||
assert output_config == expected_outout_config
|
|
||||||
|
|
||||||
|
|
||||||
def test_bigchain_run_init_when_db_exists(mock_file_config, mock_db_init_with_existing_db):
|
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 == {
|
assert bigchaindb.config == {
|
||||||
'CONFIGURED': True,
|
'CONFIGURED': True,
|
||||||
|
'server': {
|
||||||
|
'bind': '0.0.0.0:9984',
|
||||||
|
'workers': None,
|
||||||
|
'threads': None,
|
||||||
|
},
|
||||||
'database': {
|
'database': {
|
||||||
'host': 'test-host',
|
'host': 'test-host',
|
||||||
'port': 4242,
|
'port': 4242,
|
||||||
@ -135,6 +140,6 @@ def test_autoconfigure_read_both_from_file_and_env(monkeypatch):
|
|||||||
'port': 8125,
|
'port': 8125,
|
||||||
'rate': 0.01,
|
'rate': 0.01,
|
||||||
},
|
},
|
||||||
'api_endpoint': 'http://localhost:8008/api/v1',
|
'api_endpoint': 'http://localhost:9984/api/v1',
|
||||||
'consensus_plugin': 'default',
|
'consensus_plugin': 'default',
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user