MCPcopy Index your code
hub / github.com/python/cpython / test_http

Method test_http

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

Source from the content-addressed store, hash-verified

151
152 @support.requires_resource('network')
153 def test_http(self):
154 import_helper.import_module("http.client")
155 returncode, events, stderr = self.run_python("test_http_client")
156 if returncode:
157 self.fail(stderr)
158
159 if support.verbose:
160 print(*events, sep='\n')
161 self.assertEqual(events[0][0], "http.client.connect")
162 self.assertEqual(events[0][2], "www.python.org 80")
163 self.assertEqual(events[1][0], "http.client.send")
164 if events[1][2] != '[cannot send]':
165 self.assertIn('HTTP', events[1][2])
166
167
168 def test_sqlite3(self):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected