Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_net.py
Show All 37 Lines | def run_test(self): | ||||
self._test_connection_count() | self._test_connection_count() | ||||
self._test_getnettotals() | self._test_getnettotals() | ||||
self._test_getnetworkinginfo() | self._test_getnetworkinginfo() | ||||
self._test_getaddednodeinfo() | self._test_getaddednodeinfo() | ||||
self._test_getpeerinfo() | self._test_getpeerinfo() | ||||
self._test_getnodeaddresses() | self._test_getnodeaddresses() | ||||
def _test_connection_count(self): | def _test_connection_count(self): | ||||
# connect_nodes_bi connects each node to the other | # connect_nodes connects each node to the other | ||||
assert_equal(self.nodes[0].getconnectioncount(), 2) | assert_equal(self.nodes[0].getconnectioncount(), 2) | ||||
def _test_getnettotals(self): | def _test_getnettotals(self): | ||||
# getnettotals totalbytesrecv and totalbytessent should be | # getnettotals totalbytesrecv and totalbytessent should be | ||||
# consistent with getpeerinfo. Since the RPC calls are not atomic, | # consistent with getpeerinfo. Since the RPC calls are not atomic, | ||||
# and messages might have been recvd or sent between RPC calls, call | # and messages might have been recvd or sent between RPC calls, call | ||||
# getnettotals before and after and verify that the returned values | # getnettotals before and after and verify that the returned values | ||||
# from getpeerinfo are bounded by those values. | # from getpeerinfo are bounded by those values. | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |