diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-05-02 19:10:23 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-05-02 19:11:55 +0200 |
commit | 8f3e38477e30abd9dd0e24a4d612126117f7793c (patch) | |
tree | 9ed06f54580ac45fda4a0770cf974f28e2e3f77b /test/functional/p2p-timeouts.py | |
parent | 2580ff81f4422e9c2c844bc06f9dc96fd8e4b201 (diff) | |
parent | 2a52ae63bfdde948250df1c876dcdd5af99f03b5 (diff) |
Merge #10169: [tests] Remove func test code duplication
2a52ae6 Remove duplicate method definitions in NodeConnCB subclasses (John Newbery)
52e15aa Adds helper functions to NodeConnCB (John Newbery)
Tree-SHA512: 2d7909eb85b3bde0fc3ebf133798eca21e561f4b2a2880937750820a42856cfb61fc94e30591c14ac13218bcfae0ebe7c5e8662a7b10f5b02470325c44a86cf1
Diffstat (limited to 'test/functional/p2p-timeouts.py')
-rwxr-xr-x | test/functional/p2p-timeouts.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/functional/p2p-timeouts.py b/test/functional/p2p-timeouts.py index de4edd6800..210e561e74 100755 --- a/test/functional/p2p-timeouts.py +++ b/test/functional/p2p-timeouts.py @@ -28,20 +28,9 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class TestNode(NodeConnCB): - def __init__(self): - super().__init__() - self.connected = False - self.received_version = False - - def on_open(self, conn): - self.connected = True - - def on_close(self, conn): - self.connected = False - def on_version(self, conn, message): # Don't send a verack in response - self.received_version = True + pass class TimeoutsTest(BitcoinTestFramework): def __init__(self): @@ -83,7 +72,7 @@ class TimeoutsTest(BitcoinTestFramework): sleep(30) - assert(self.no_verack_node.received_version) + assert "version" in self.no_verack_node.last_message assert(self.no_verack_node.connected) assert(self.no_version_node.connected) |