Browse Source

pytest: Fix a test assuming a specific DB order

Postgresql does not guarantee insertion order when querying, so we need to
actually go and look for the correct transaction.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
travis-debug
Christian Decker 5 years ago
committed by Rusty Russell
parent
commit
3482d254e3
  1. 5
      tests/test_wallet.py

5
tests/test_wallet.py

@ -676,5 +676,6 @@ def test_fundchannel_listtransaction(node_factory, bitcoind):
# next call warned about SQL Accessing a null column
# and crashed the daemon for accessing random memory or null
txs = l1.rpc.listtransactions()['transactions']
assert txs[0]['hash'] == txid
assert txs[0]['blockheight'] == 0
tx = [t for t in txs if t['hash'] == txid][0]
assert tx['blockheight'] == 0

Loading…
Cancel
Save