]> granicus.if.org Git - python/commitdiff
Move test case for HTTP response dict to httplib.
authorGeorg Brandl <georg@python.org>
Fri, 17 Feb 2006 22:01:08 +0000 (22:01 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 17 Feb 2006 22:01:08 +0000 (22:01 +0000)
Lib/test/test_httplib.py
Lib/test/test_urllib2.py

index ede0f4b82f99289141d5fcc7e75a6e2db623204d..90bae887c3155397bde25055f41a11d32309d661 100644 (file)
@@ -161,8 +161,12 @@ def _test():
     resp.close()
 
 
+class OfflineTest(TestCase):
+    def test_responses(self):
+        self.assertEquals(httplib.responses[httplib.NOT_FOUND], "Not Found")
+
 def test_main(verbose=None):
-    tests = [HeaderTests,]
+    tests = [HeaderTests,OfflineTest]
     test_support.run_unittest(*tests)
 
 test()
index 8248967226d278cb303c67140eb26aa8eb35de36..0b2a65061cd6434d627075f3a13c92c940839e99 100644 (file)
@@ -41,10 +41,6 @@ class TrivialTests(unittest.TestCase):
         buf = f.read()
         f.close()
 
-    def test_statudict(self):
-        # test the new-in-2.5 httpresponses dictionary
-        self.assertEquals(urllib2.httpresponses[404], "Not Found")
-
     def test_parse_http_list(self):
         tests = [('a,b,c', ['a', 'b', 'c']),
                  ('path"o,l"og"i"cal, example', ['path"o,l"og"i"cal', 'example']),