You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2004/02/23 18:37:17 UTC

cvs commit: httpd-python/test/htdocs tests.py

grisha      2004/02/23 09:37:17

  Modified:    src/include psp_flex.h
               test     test.py
               test/htdocs tests.py
  Log:
  Modify the req_requires test
  
  Revision  Changes    Path
  1.10      +1 -1      httpd-python/src/include/psp_flex.h
  
  Index: psp_flex.h
  ===================================================================
  RCS file: /home/cvs/httpd-python/src/include/psp_flex.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- psp_flex.h	16 Feb 2004 19:00:07 -0000	1.9
  +++ psp_flex.h	23 Feb 2004 17:37:16 -0000	1.10
  @@ -321,7 +321,7 @@
   #undef YY_DECL_IS_OURS
   #undef YY_DECL
   #endif
  -#line 267 "psp_parser.l"
  +#line 228 "psp_parser.l"
   
   
   #line 328 "include/psp_flex.h"
  
  
  
  1.42      +12 -2     httpd-python/test/test.py
  
  Index: test.py
  ===================================================================
  RCS file: /home/cvs/httpd-python/test/test.py,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- test.py	16 Feb 2004 19:49:15 -0000	1.41
  +++ test.py	23 Feb 2004 17:37:16 -0000	1.42
  @@ -125,6 +125,7 @@
   import time
   import socket
   import tempfile
  +import base64
   
   HTTPD = testconf.HTTPD
   TESTHOME = testconf.TESTHOME
  @@ -372,7 +373,6 @@
           conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT)
           conn.putrequest("GET", "/tests.py", skip_host=1)
           conn.putheader("Host", "%s:%s" % ("test_req_get_basic_auth_pw", PORT))
  -        import base64
           auth = base64.encodestring("spam:eggs").strip()
           conn.putheader("Authorization", "Basic %s" % auth)
           conn.endheaders()
  @@ -402,6 +402,16 @@
           print "\n  * Testing req.requires()"
   
           rsp = self.vhost_get("test_req_requires")
  +
  +        conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT)
  +        conn.putrequest("GET", "/tests.py", skip_host=1)
  +        conn.putheader("Host", "%s:%s" % ("test_req_requires", PORT))
  +        auth = base64.encodestring("spam:eggs").strip()
  +        conn.putheader("Authorization", "Basic %s" % auth)
  +        conn.endheaders()
  +        response = conn.getresponse()
  +        rsp = response.read()
  +        conn.close()
   
           if (rsp != "test ok"):
               self.fail(`rsp`)
  
  
  
  1.36      +2 -1      httpd-python/test/htdocs/tests.py
  
  Index: tests.py
  ===================================================================
  RCS file: /home/cvs/httpd-python/test/htdocs/tests.py,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- tests.py	8 Oct 2003 03:48:17 -0000	1.35
  +++ tests.py	23 Feb 2004 17:37:16 -0000	1.36
  @@ -599,6 +599,7 @@
       if req.requires() == ('valid-user',):
           req.write("test ok")
           return apache.DONE
  +
       return apache.OK
   
   def req_document_root(req):