From af3684378862bda424bbb62e9676a706ea903890 Mon Sep 17 00:00:00 2001 From: z-bowen Date: Wed, 12 Sep 2018 14:49:10 +0200 Subject: [PATCH] Problem: Need an integration test for `run_election_new_migration` Solution: Added an `abci` test for this method --- tests/commands/test_commands.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index 6b8930f3..544af18a 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -343,6 +343,20 @@ def test_election_new_upsert_validator_without_tendermint(caplog, b, priv_valida 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 def test_election_new_migration_without_tendermint(caplog, b, priv_validator_path, user_sk): from bigchaindb.commands.bigchaindb import run_election_new_migration