mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
more assertions in test
This commit is contained in:
parent
955b018be8
commit
7469f60d17
@ -4,9 +4,7 @@ import random
|
||||
|
||||
@pytest.mark.bdb
|
||||
def test_stepping_changefeed_produces_update(b, steps):
|
||||
input_single_create(b)
|
||||
steps.block_changefeed()
|
||||
steps.block_filter_tx()
|
||||
tx = input_single_create(b)
|
||||
|
||||
# timeouts are 0 so will reassign immediately
|
||||
steps.stale_check_transactions()
|
||||
@ -14,7 +12,11 @@ def test_stepping_changefeed_produces_update(b, steps):
|
||||
|
||||
# We expect 2 changefeed events
|
||||
steps.block_changefeed()
|
||||
steps.block_filter_tx()
|
||||
steps.block_changefeed()
|
||||
|
||||
assert steps.get_counts() == {'block_filter_tx': 2}
|
||||
assert ([tx['id'] for tx in steps.queues['block_filter_tx']] ==
|
||||
[tx.id, tx.id])
|
||||
|
||||
|
||||
def input_single_create(b):
|
||||
@ -22,3 +24,4 @@ def input_single_create(b):
|
||||
metadata = {'r': random.random()}
|
||||
tx = Transaction.create([b.me], [([b.me], 1)], metadata)
|
||||
b.write_transaction(tx)
|
||||
return tx
|
||||
|
Loading…
x
Reference in New Issue
Block a user