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

Method test_200

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

Source from the content-addressed store, hash-verified

549 self.assertEqual(handler.requests, ["/weeble"])
550
551 def test_200(self):
552 expected_response = b"pycon 2008..."
553 handler = self.start_server([(200, [], expected_response)])
554 data = self.urlopen("http://localhost:%s/bizarre" % handler.port)
555 self.assertEqual(data, expected_response)
556 self.assertEqual(handler.requests, ["/bizarre"])
557
558 def test_200_with_parameters(self):
559 expected_response = b"pycon 2008..."

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected