(self)
| 610 | self.assertTrue(open_url.read(), "calling 'read' failed") |
| 611 | |
| 612 | def test_info(self): |
| 613 | handler = self.start_server() |
| 614 | open_url = urllib.request.urlopen( |
| 615 | "http://localhost:%s" % handler.port) |
| 616 | with open_url: |
| 617 | info_obj = open_url.info() |
| 618 | self.assertIsInstance(info_obj, email.message.Message, |
| 619 | "object returned by 'info' is not an " |
| 620 | "instance of email.message.Message") |
| 621 | self.assertEqual(info_obj.get_content_subtype(), "plain") |
| 622 | |
| 623 | def test_geturl(self): |
| 624 | # Make sure same URL as opened is returned by geturl. |
nothing calls this directly
no test coverage detected