mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
#17474 - Remove the various deprecated methods of Request class.
This commit is contained in:
parent
80cbc9e998
commit
41518b4af0
4 changed files with 2 additions and 134 deletions
|
|
@ -630,27 +630,6 @@ class OpenerDirectorTests(unittest.TestCase):
|
|||
self.assertTrue(args[1] is None or
|
||||
isinstance(args[1], MockResponse))
|
||||
|
||||
def test_method_deprecations(self):
|
||||
req = Request("http://www.example.com")
|
||||
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.add_data("data")
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.get_data()
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.has_data()
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.get_host()
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.get_selector()
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.is_unverifiable()
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.get_origin_req_host()
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
req.get_type()
|
||||
|
||||
|
||||
def sanepathname2url(path):
|
||||
try:
|
||||
path.encode("utf-8")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue