bigchaindb/tests/test_consensus.py
Sylvain Bellemare ac680cf5e9 Test consensus (#398)
* Remove unused import

* Simplify and group the imports

* Add extra space (pep 8)

* Remove NotImplementedError

the class BaseConsensusRules implements verify_vote_signature

* Add test module for consensus module
2016-06-28 14:19:07 +02:00

16 lines
418 B
Python

import pytest
class TestBaseConsensusRules(object):
def test_validate_transaction(self):
from bigchaindb.consensus import BaseConsensusRules
transaction = {
'transaction': {
'operation': None,
'fulfillments': None,
},
}
with pytest.raises(ValueError):
BaseConsensusRules.validate_transaction(None, transaction)