Skip to content

Commit

Permalink
tests: make test_plugin::test_sql order agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 committed Apr 12, 2024
1 parent 78fa319 commit ca556b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4038,7 +4038,9 @@ def test_sql(node_factory, bitcoind):
assert res['tablename'] == table
assert res.get('indices') == schema.get('indices')
sqlcolumns = [{'name': c['name'], 'type': sqltypemap[c['type']]} for c in [rowidcol] + schema['columns']]
assert res['columns'] == sqlcolumns
sorted_res_columns = sorted(res["columns"], key=lambda x: x["name"])
sorted_sqlcolumns = sorted(sqlcolumns, key=lambda x: x["name"])
assert sorted_res_columns == sorted_sqlcolumns

# Make sure we didn't miss any
assert (sorted([s['tablename'] for s in l1.rpc.listsqlschemas()['schemas']])
Expand Down

0 comments on commit ca556b0

Please sign in to comment.