MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_http

Method test_http

Lib/test/test_audit.py:144–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142
143 @support.requires_resource('network')
144 def test_http(self):
145 import_helper.import_module("http.client")
146 returncode, events, stderr = self.run_python("test_http_client")
147 if returncode:
148 self.fail(stderr)
149
150 if support.verbose:
151 print(*events, sep='\n')
152 self.assertEqual(events[0][0], "http.client.connect")
153 self.assertEqual(events[0][2], "www.python.org 80")
154 self.assertEqual(events[1][0], "http.client.send")
155 if events[1][2] != '[cannot send]':
156 self.assertIn('HTTP', events[1][2])
157
158
159 def test_sqlite3(self):

Callers

nothing calls this directly

Calls 6

run_pythonMethod · 0.95
assertInMethod · 0.80
printFunction · 0.50
import_moduleMethod · 0.45
failMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected