tx version break step with server version (#1574)

* tx version break step with server version
* fix regular expression for tx version
* restore docstring for Transaction version parameter
* add test for correct transaction version
This commit is contained in:
libscott
2017-06-22 07:50:42 -07:00
committed by GitHub
parent 9ceea89537
commit 074e783088
3 changed files with 8 additions and 14 deletions

View File

@@ -165,14 +165,9 @@ def test_high_amounts(create_tx):
# Version
def test_validate_version(create_tx):
import re
import bigchaindb.version
short_ver = bigchaindb.version.__short_version__
assert create_tx.version == re.match(r'^(.*\d)', short_ver).group(1)
create_tx.version = '1.0'
validate(create_tx)
# At version 1, transaction version will break step with server version.
create_tx.version = '1.0.0'
create_tx.version = '0.10'
validate_raises(create_tx)
create_tx.version = '110'
validate_raises(create_tx)