mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fix tests
This commit is contained in:
parent
2269e1380b
commit
dda16059ee
@ -83,7 +83,6 @@ class TestBigchainApi(object):
|
||||
assert b.validate_fulfillments(tx) == False
|
||||
assert b.validate_fulfillments(tx_signed) == True
|
||||
|
||||
|
||||
def test_transaction_signature(self, b, user_sk, user_vk):
|
||||
tx = b.create_transaction(user_vk, user_vk, None, 'CREATE')
|
||||
tx_signed = b.sign_transaction(tx, user_sk)
|
||||
@ -132,6 +131,7 @@ class TestBigchainApi(object):
|
||||
b.write_transaction(tx_signed)
|
||||
|
||||
response, status = b.get_transaction(tx_signed["id"], include_status=True)
|
||||
response.pop('assignee')
|
||||
# add validity information, which will be returned
|
||||
assert util.serialize(tx_signed) == util.serialize(response)
|
||||
assert status == b.TX_IN_BACKLOG
|
||||
|
@ -76,7 +76,9 @@ def test_delete_tx(b, user_vk):
|
||||
tx = b.sign_transaction(tx, b.me_private)
|
||||
b.write_transaction(tx)
|
||||
|
||||
assert r.table('backlog').get(tx['id']).run(b.conn) == tx
|
||||
tx_backlog = r.table('backlog').get(tx['id']).run(b.conn)
|
||||
tx_backlog.pop('assignee')
|
||||
assert tx_backlog == tx
|
||||
|
||||
returned_tx = block_maker.delete_tx(tx)
|
||||
|
||||
|
@ -97,8 +97,10 @@ def test_check_requeue_transaction(b, user_vk):
|
||||
test_block = b.create_block([tx1])
|
||||
|
||||
e.requeue_transactions(test_block)
|
||||
tx_backlog = r.table('backlog').get(tx1['id']).run(b.conn)
|
||||
tx_backlog.pop('assignee')
|
||||
|
||||
assert r.table('backlog').get(tx1['id']).run(b.conn) == tx1
|
||||
assert tx_backlog == tx1
|
||||
|
||||
|
||||
@patch.object(Pipeline, 'start')
|
||||
|
Loading…
x
Reference in New Issue
Block a user