Problem: Need an integration test for run_election_new_migration

Solution: Added an `abci` test for this method
This commit is contained in:
z-bowen 2018-09-12 14:49:10 +02:00
parent 3f81e7eeaa
commit af36843788

View File

@ -343,6 +343,20 @@ def test_election_new_upsert_validator_without_tendermint(caplog, b, priv_valida
assert b.get_transaction(election_id) assert b.get_transaction(election_id)
@pytest.mark.abci
def test_election_new_migration_with_tendermint(b, priv_validator_path, user_sk, validators):
from bigchaindb.commands.bigchaindb import run_election_new_migration
new_args = Namespace(action='new',
election_type='migration',
sk=priv_validator_path,
config={})
election_id = run_election_new_migration(new_args, b)
assert b.get_transaction(election_id)
@pytest.mark.bdb @pytest.mark.bdb
def test_election_new_migration_without_tendermint(caplog, b, priv_validator_path, user_sk): def test_election_new_migration_without_tendermint(caplog, b, priv_validator_path, user_sk):
from bigchaindb.commands.bigchaindb import run_election_new_migration from bigchaindb.commands.bigchaindb import run_election_new_migration