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

Method test_info

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

Source from the content-addressed store, hash-verified

556 self.assertHasAttr(self.text_url_resp, attr)
557
558 def test_info(self):
559 self.assertIsInstance(self.text_url_resp.info(), email.message.Message)
560 self.assertEqual(self.text_url_base64_resp.info().get_params(),
561 [('text/plain', ''), ('charset', 'ISO-8859-1')])
562 self.assertEqual(self.image_url_resp.info()['content-length'],
563 str(len(self.image)))
564 r = urllib.request.urlopen("data:,")
565 self.assertEqual(r.info().get_params(),
566 [('text/plain', ''), ('charset', 'US-ASCII')])
567 r.close()
568
569 def test_geturl(self):
570 self.assertEqual(self.text_url_resp.geturl(), self.text_url)

Callers

nothing calls this directly

Calls 7

strFunction · 0.85
assertIsInstanceMethod · 0.80
get_paramsMethod · 0.80
infoMethod · 0.45
assertEqualMethod · 0.45
urlopenMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected