[Jython-checkins] jython: Correct issue #2109 test failures in test_httpservers on Windows.

jeff.allen jython-checkins at python.org
Sat Jan 25 23:56:20 CET 2014


http://hg.python.org/jython/rev/6441fcfd940b
changeset:   7176:6441fcfd940b
parent:      7171:05192fad65cb
user:        Jeff Allen <ja.py at farowl.co.uk>
date:        Wed Jan 15 08:16:12 2014 +0000
summary:
  Correct issue #2109 test failures in test_httpservers on Windows.
In the affected tests, use method names that do not have a special meaning to packet filtering
software (on Windows, the Base Filtering Engine). In clause test_version_none, use a method that
would be valid if HTTP/0.9 were not correctly detected. Also Python issue 20155.

files:
  Lib/test/test_httpservers.py |  5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -189,7 +189,7 @@
 
     def test_request_line_trimming(self):
         self.con._http_vsn_str = 'HTTP/1.1\n'
-        self.con.putrequest('GET', '/')
+        self.con.putrequest('XYZBOGUS', '/')
         self.con.endheaders()
         res = self.con.getresponse()
         self.assertEqual(res.status, 501)
@@ -216,8 +216,9 @@
         self.assertEqual(res.status, 501)
 
     def test_version_none(self):
+        # Test that a valid method is rejected when not HTTP/1.x
         self.con._http_vsn_str = ''
-        self.con.putrequest('PUT', '/')
+        self.con.putrequest('CUSTOM', '/')
         self.con.endheaders()
         res = self.con.getresponse()
         self.assertEqual(res.status, 400)

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list