mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
short form 0.9, 0.10 etc tx version with no '.dev' suffix
This commit is contained in:
parent
e7ffcf5705
commit
ccdbb91c1c
@ -410,7 +410,7 @@ class Transaction(object):
|
||||
TRANSFER = 'TRANSFER'
|
||||
GENESIS = 'GENESIS'
|
||||
ALLOWED_OPERATIONS = (CREATE, TRANSFER, GENESIS)
|
||||
VERSION = bigchaindb.version.__version__
|
||||
VERSION = bigchaindb.version.__short_version__[:-4] # 0.9, 0.10 etc
|
||||
|
||||
def __init__(self, operation, asset, inputs=None, outputs=None,
|
||||
metadata=None, version=None):
|
||||
|
@ -966,11 +966,13 @@ def test_cant_add_empty_input():
|
||||
|
||||
|
||||
def test_validate_version(utx):
|
||||
import re
|
||||
import bigchaindb.version
|
||||
from .utils import validate_transaction_model
|
||||
from bigchaindb.common.exceptions import SchemaValidationError
|
||||
|
||||
assert utx.version == bigchaindb.version.__version__
|
||||
short_ver = bigchaindb.version.__short_version__
|
||||
assert utx.version == re.match(r'^(.*\d)', short_ver).group(1)
|
||||
|
||||
validate_transaction_model(utx)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user