#17474 - Remove the various deprecated methods of Request class.

This commit is contained in:
Senthil Kumaran 2013-03-18 18:06:00 -07:00
parent 80cbc9e998
commit 41518b4af0
4 changed files with 2 additions and 134 deletions

View file

@ -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")