MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / _run_nonloopback_tests

Method _run_nonloopback_tests

test/functional/rpc_bind.py:114–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

112 [('127.0.0.1', self.defaultport), ('::1', self.defaultport)])
113
114 def _run_nonloopback_tests(self):
115 self.log.info("Using interface %s for testing" % self.non_loopback_ip)
116
117 # check only non-loopback interface
118 self.run_bind_test([self.non_loopback_ip], self.non_loopback_ip, [self.non_loopback_ip],
119 [(self.non_loopback_ip, self.defaultport)])
120
121 # Check that with invalid rpcallowip, we are denied
122 self.run_allowip_test([self.non_loopback_ip], self.non_loopback_ip, self.defaultport)
123 assert_raises_rpc_error(-342, "non-JSON HTTP response with '403 Forbidden' from server", self.run_allowip_test, ['1.1.1.1'], self.non_loopback_ip, self.defaultport)
124
125if __name__ == '__main__':
126 RPCBindTest().main()

Callers 1

run_testMethod · 0.95

Calls 4

run_bind_testMethod · 0.95
run_allowip_testMethod · 0.95
assert_raises_rpc_errorFunction · 0.90
infoMethod · 0.80

Tested by

no test coverage detected