From 38fcd4d792c08fdccbfb6e65a9655902ac59261c Mon Sep 17 00:00:00 2001 From: z-bowen Date: Thu, 6 Sep 2018 17:27:02 +0200 Subject: [PATCH] Problem: Minor style issues with PR Solution: Addressing comments --- bigchaindb/elections/election.py | 2 +- bigchaindb/elections/vote.py | 2 +- tests/tendermint/test_core.py | 4 ++-- tests/tendermint/test_lib.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bigchaindb/elections/election.py b/bigchaindb/elections/election.py index f5ee42bb..b5eecc86 100644 --- a/bigchaindb/elections/election.py +++ b/bigchaindb/elections/election.py @@ -97,7 +97,7 @@ class Election(Transaction): :param current_transactions: (list) A list of transactions to be validated along with the election Returns: - ValidatorElection object + Election: a Election object or an object of the derived Election subclass. Raises: ValidationError: If the election is invalid diff --git a/bigchaindb/elections/vote.py b/bigchaindb/elections/vote.py index 6951da3c..01175290 100644 --- a/bigchaindb/elections/vote.py +++ b/bigchaindb/elections/vote.py @@ -30,7 +30,7 @@ class Vote(Transaction): bigchain (BigchainDB): an instantiated bigchaindb.lib.BigchainDB object. Returns: - Vote object + Vote: a Vote object Raises: ValidationError: If the election vote is invalid diff --git a/tests/tendermint/test_core.py b/tests/tendermint/test_core.py index 73f306ae..887222ee 100644 --- a/tests/tendermint/test_core.py +++ b/tests/tendermint/test_core.py @@ -366,8 +366,8 @@ def test_end_block_return_validator_updates(b, init_chain_request): resp = app.end_block(RequestEndBlock(height=99)) assert resp.validator_updates[0] == encode_validator(validator) - updates = b.is_approved() - assert updates == [] + updates = b.approved_update() + assert not updates def test_store_pre_commit_state_in_end_block(b, alice, init_chain_request): diff --git a/tests/tendermint/test_lib.py b/tests/tendermint/test_lib.py index 21bcf7f8..eb6de2d7 100644 --- a/tests/tendermint/test_lib.py +++ b/tests/tendermint/test_lib.py @@ -164,11 +164,11 @@ def test_validator_updates(b, validator_pub_key): 'update_id': VALIDATOR_UPDATE_ID} query.store_validator_update(b.connection, validator_update) - updates = b.is_approved() - assert updates == [validator_update['validator']] + updates = b.approved_updates() + assert updates == validator_update['validator'] b.delete_validator_update() - assert b.is_approved() == [] + assert not b.approved_updates() @pytest.mark.bdb