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 2006/05/22 13:18:41 UTC

svn commit: r408643 - in /httpd/mod_python/trunk/test: htdocs/tests.py test.py

Author: grahamd
Date: Mon May 22 04:18:41 2006
New Revision: 408643

URL: http://svn.apache.org/viewvc?rev=408643&view=rev
Log:
Make phase status test more resiliant to strange httpd build
configurations. On some platforms authz handler phase was being called when
it wasn't expected that it would be called.


Modified:
    httpd/mod_python/trunk/test/htdocs/tests.py
    httpd/mod_python/trunk/test/test.py

Modified: httpd/mod_python/trunk/test/htdocs/tests.py
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/test/htdocs/tests.py?rev=408643&r1=408642&r2=408643&view=diff
==============================================================================
--- httpd/mod_python/trunk/test/htdocs/tests.py (original)
+++ httpd/mod_python/trunk/test/htdocs/tests.py Mon May 22 04:18:41 2006
@@ -1140,13 +1140,13 @@
 
 def phase_status_4(req):
     apache.log_error("phase_status_4")
-    req.phases.append(4)
-    return apache.DECLINED
+    #req.phases.append(4)
+    return apache.OK
 
 def phase_status_5(req):
     apache.log_error("phase_status_5")
     req.phases.append(5)
-    return apache.OK
+    return apache.DECLINED
 
 def phase_status_6(req):
     apache.log_error("phase_status_6")
@@ -1155,7 +1155,13 @@
 
 def phase_status_7(req):
     apache.log_error("phase_status_7")
-    if req.phases != [1, 2, 4, 5, 6]:
+    req.phases.append(7)
+    return apache.OK
+
+def phase_status_8(req):
+    apache.log_error("phase_status_8")
+    apache.log_error("phases = %s" % req.phases)
+    if req.phases != [1, 2, 5, 6, 7]:
         req.write("test failed")
     else:
         req.write("test ok")

Modified: httpd/mod_python/trunk/test/test.py
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/test/test.py?rev=408643&r1=408642&r2=408643&view=diff
==============================================================================
--- httpd/mod_python/trunk/test/test.py (original)
+++ httpd/mod_python/trunk/test/test.py Mon May 22 04:18:41 2006
@@ -2111,10 +2111,11 @@
                                   PythonAuthenHandler("tests::phase_status_1"),
                                   PythonAuthenHandler("tests::phase_status_2"),
                                   PythonAuthenHandler("tests::phase_status_3"),
-                                  PythonFixupHandler("tests::phase_status_4"),
+                                  PythonAuthzHandler("tests::phase_status_4"),
                                   PythonFixupHandler("tests::phase_status_5"),
                                   PythonFixupHandler("tests::phase_status_6"),
-                                  PythonHandler("tests::phase_status_7"),
+                                  PythonFixupHandler("tests::phase_status_7"),
+                                  PythonHandler("tests::phase_status_8"),
                                   PythonDebug("On")))
         return str(c)