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

Method test_info

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

Source from the content-addressed store, hash-verified

624
625
626 def test_info(self):
627 handler = self.start_server()
628 open_url = urllib.request.urlopen(
629 "http://localhost:%s" % handler.port)
630 with open_url:
631 info_obj = open_url.info()
632 self.assertIsInstance(info_obj, email.message.Message,
633 "object returned by 'info' is not an "
634 "instance of email.message.Message")
635 self.assertEqual(info_obj.get_content_subtype(), "plain")
636
637
638 def test_geturl(self):

Callers

nothing calls this directly

Calls 6

start_serverMethod · 0.95
assertIsInstanceMethod · 0.80
get_content_subtypeMethod · 0.80
urlopenMethod · 0.45
infoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected