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

Method test_info

Lib/test/test_urllibnet.py:85–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 "readlines did not return a list")
84
85 def test_info(self):
86 # Test 'info'.
87 with self.urlopen(self.url) as open_url:
88 info_obj = open_url.info()
89 self.assertIsInstance(info_obj, email.message.Message,
90 "object returned by 'info' is not an "
91 "instance of email.message.Message")
92 self.assertEqual(info_obj.get_content_subtype(), "html")
93
94 def test_geturl(self):
95 # Make sure same URL as opened is returned by geturl.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected