[Tests] Tidy up REST interface functional tests #12766
pull romanz wants to merge 6 commits into bitcoin:master from romanz:tidy_up_rest_test changing 1 files +194 −248-
romanz commented at 12:23 pm on March 23, 2018: contributorFollowing the comment at #12717#pullrequestreview-106189117.
-
fanquake added the label Tests on Mar 23, 2018
-
romanz force-pushed on Mar 23, 2018
-
fanquake requested review from jnewbery on Mar 26, 2018
-
romanz force-pushed on Mar 27, 2018
-
romanz renamed this:
[WIP] Tidy up REST interface functional tests
[Tests] Tidy up REST interface functional tests
on Mar 27, 2018 -
romanz force-pushed on Apr 2, 2018
-
in test/functional/interface_rest.py:283 in d54e3e7048 outdated
518- for tx in json_obj['tx']: 519- if not 'coinbase' in tx['vin'][0]: #exclude coinbase 520- assert_equal(tx['txid'] in txs, True) 521+ # Check if the 3 tx show up in the new block 522+ json_obj = self.test_rest_request("/block/{}".format(newblockhash[0])) 523+ non_coinbase_txs = [tx['txid'] for tx in json_obj['tx']
jnewbery commented at 5:58 pm on April 2, 2018:I’m not sure if ordering is guaranteed here. Perhaps construct sets and check for set equality?
romanz commented at 8:44 am on April 3, 2018:Sounds good - done.jnewbery commented at 6:02 pm on April 2, 2018: memberTested ACK d54e3e704838eb39a5e6e33d8b530c6ed404fd49. One comment inline.
Commits can probably be squashed a bit before merge. Feel free to take my changes without the commit messages if that makes things more structured.
romanz force-pushed on Apr 3, 2018[tests] fix flake8 warnings in interface_rest.py test abf190e4e7[tests] improve logging and documentation in interface_rest.py 3fd4490db1[tests] Make json request building more consistent in interface_rest.py 7a3181a767[tests] refactor interface_rest.py to avoid code repetition
Also refactor txout index parsing and formatting.
[tests] only use 2 nodes in interface_rest.py ade5964e3f[tests] simplify binary and hex response parsing in interface_rest.py
We use assert_greater_than_or_equal(), since the hex response contains an extra b'\n' traling byte.
romanz force-pushed on Apr 3, 2018romanz commented at 8:45 am on April 3, 2018: contributorCommits can probably be squashed a bit before merge.
Squashed most of the small commits into a few large ones.
jnewbery commented at 4:07 pm on April 3, 2018: memberTested ACK 55efc1f62cef7e19efcb58ba68fbc2053bfa19a0.
Nicely structured PR. Very easy to review! Thanks
laanwj commented at 2:09 pm on April 7, 2018: memberutACK 55efc1flaanwj merged this on Apr 7, 2018laanwj closed this on Apr 7, 2018
laanwj referenced this in commit 69310a342f on Apr 7, 2018romanz deleted the branch on Apr 8, 2018UdjinM6 referenced this in commit d69f704014 on May 21, 2021UdjinM6 referenced this in commit b1223b4925 on May 21, 2021UdjinM6 referenced this in commit 41a616e0cc on May 21, 2021UdjinM6 referenced this in commit 213e509f30 on May 22, 2021kittywhiskers referenced this in commit 64bbcbd405 on May 25, 2021MarcoFalke locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me