]> granicus.if.org Git - python/commitdiff
Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 8 Feb 2014 12:51:10 +0000 (14:51 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 8 Feb 2014 12:51:10 +0000 (14:51 +0200)
1  2 
Lib/test/test_ftplib.py
Lib/test/test_httplib.py
Lib/test/test_httpservers.py
Lib/test/test_urllib.py
Lib/test/test_urllib2.py
Lib/test/test_urllib2net.py

Simple merge
Simple merge
Simple merge
Simple merge
index dbd1c60ec24bd6fc1a6014c991d267d233c3bcbf,3559b1b7898c64b8b5f7e8d5d40376c630941730..b32b4090e886232dc221839c3c4d833f71e93ac5
@@@ -603,9 -594,30 +603,9 @@@ class OpenerDirectorTests(unittest.Test
                  self.assertIsInstance(args[0], Request)
                  # response from opener.open is None, because there's no
                  # handler that defines http_open to handle it
-                 self.assertTrue(args[1] is None or
-                              isinstance(args[1], MockResponse))
+                 if args[1] is not None:
+                     self.assertIsInstance(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")
Simple merge