mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447)
Co-Authored-By: epicfaace <aramaswamis@gmail.com>
This commit is contained in:
parent
bb41147eab
commit
ff2e182865
7 changed files with 84 additions and 26 deletions
|
@ -194,6 +194,15 @@ class urlopen_FileTests(unittest.TestCase):
|
|||
# by the tearDown() method for the test
|
||||
self.returned_obj.close()
|
||||
|
||||
def test_headers(self):
|
||||
self.assertIsInstance(self.returned_obj.headers, email.message.Message)
|
||||
|
||||
def test_url(self):
|
||||
self.assertEqual(self.returned_obj.url, self.pathname)
|
||||
|
||||
def test_status(self):
|
||||
self.assertIsNone(self.returned_obj.status)
|
||||
|
||||
def test_info(self):
|
||||
self.assertIsInstance(self.returned_obj.info(), email.message.Message)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue