MCPcopy Create free account
hub / github.com/python/cpython / test_200_with_parameters

Method test_200_with_parameters

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

Source from the content-addressed store, hash-verified

556 self.assertEqual(handler.requests, ["/bizarre"])
557
558 def test_200_with_parameters(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 b"get=with_feeling")
563 self.assertEqual(data, expected_response)
564 self.assertEqual(handler.requests, ["/bizarre", b"get=with_feeling"])
565
566 def test_https(self):
567 handler = self.start_https_server()

Callers

nothing calls this directly

Calls 3

start_serverMethod · 0.95
urlopenMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected