]> granicus.if.org Git - python/commitdiff
Issue #26609: Fix up Python 2 port
authorMartin Panter <vadmium+py@gmail.com>
Sat, 9 Apr 2016 13:45:52 +0000 (13:45 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 9 Apr 2016 13:45:52 +0000 (13:45 +0000)
Lib/test/test_httpservers.py

index ab74e5b8659e216353675b08abb1a96db93ffd45..8dab627e76b9be1adff963d3149325cf6ab3e455 100644 (file)
@@ -363,17 +363,17 @@ class SimpleHTTPServerTestCase(BaseTestCase):
 
     def test_path_without_leading_slash(self):
         response = self.request(self.tempdir_name + '/test')
-        self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
+        self.check_status_and_reason(response, 200, data=self.data)
         response = self.request(self.tempdir_name + '/test/')
-        self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
+        self.check_status_and_reason(response, 404)
         response = self.request(self.tempdir_name + '/')
-        self.check_status_and_reason(response, HTTPStatus.OK)
+        self.check_status_and_reason(response, 200)
         response = self.request(self.tempdir_name)
-        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
+        self.check_status_and_reason(response, 301)
         response = self.request(self.tempdir_name + '/?hi=2')
-        self.check_status_and_reason(response, HTTPStatus.OK)
+        self.check_status_and_reason(response, 200)
         response = self.request(self.tempdir_name + '?hi=1')
-        self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
+        self.check_status_and_reason(response, 301)
         self.assertEqual(response.getheader("Location"),
                          self.tempdir_name + "/?hi=1")