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

Method test_200

Lib/test/test_urllib2_localnet.py:558–563  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

556
557
558 def test_200(self):
559 expected_response = b"pycon 2008..."
560 handler = self.start_server([(200, [], expected_response)])
561 data = self.urlopen("http://localhost:%s/bizarre" % handler.port)
562 self.assertEqual(data, expected_response)
563 self.assertEqual(handler.requests, ["/bizarre"])
564
565
566 def test_200_with_parameters(self):

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected