From 6de1d18efc1cac31c0ef70cf5e05ece1e621eda3 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 3 May 2016 15:36:41 +0200 Subject: [PATCH] test mismatched vote, block sigs --- tests/db/test_voter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/db/test_voter.py b/tests/db/test_voter.py index 6ee33227..2478053b 100644 --- a/tests/db/test_voter.py +++ b/tests/db/test_voter.py @@ -359,6 +359,13 @@ class TestBlockElection(object): test_block['block']['votes'] = valid_vote[:2] assert b.block_election_status(test_block) == 'undecided' + # change signatures in block, should fail + test_block['block']['voters'][0] = 'abc' + test_block['block']['voters'][1] = 'abc' + test_block['block']['votes'] = valid_vote + assert b.block_election_status(test_block) == 'invalid' + + def test_quorum_odd(self, b): # test partial quorum situations for odd numbers of voters # create a new block test_block = b.create_block([])