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/02/19 09:53:55 UTC
svn commit: r378862 - in /httpd/mod_python/trunk/test: htdocs/tests.py
test.py
Author: grahamd
Date: Sun Feb 19 00:53:55 2006
New Revision: 378862
URL: http://svn.apache.org/viewcvs?rev=378862&view=rev
Log:
Fix test for req.get_basic_auth_pw(). It wasn't actually testing the
function at all.
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/viewcvs/httpd/mod_python/trunk/test/htdocs/tests.py?rev=378862&r1=378861&r2=378862&view=diff
==============================================================================
--- httpd/mod_python/trunk/test/htdocs/tests.py (original)
+++ httpd/mod_python/trunk/test/htdocs/tests.py Sun Feb 19 00:53:55 2006
@@ -634,9 +634,9 @@
def req_get_basic_auth_pw(req):
- if (req.phase == "PythonAuthenHandler"):
- if req.user != "spam":
- return apache.HTTP_UNAUTHORIZED
+ pw = req.get_basic_auth_pw()
+ if req.user != "spam" or pw != "eggs":
+ req.write("test failed")
else:
req.write("test ok")
Modified: httpd/mod_python/trunk/test/test.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/test/test.py?rev=378862&r1=378861&r2=378862&view=diff
==============================================================================
--- httpd/mod_python/trunk/test/test.py (original)
+++ httpd/mod_python/trunk/test/test.py Sun Feb 19 00:53:55 2006
@@ -609,7 +609,6 @@
SetHandler("mod_python"),
AuthName("blah"),
AuthType("basic"),
- PythonAuthenHandler("tests::req_get_basic_auth_pw"),
PythonHandler("tests::req_get_basic_auth_pw"),
PythonDebug("On")))
return str(c)