On 12/01/2006, at 11:10 AM, Jim Gallacher wrote:
Jim Gallacher (JIRA) wrote:
[
http://issues.apache.org/jira/browse/MODPYTHON-98?
page=comments#action_12362399 ] Jim Gallacher commented on
MODPYTHON-98:
----------------------------------------
Applied Graham's suggestions so all these related issues can be
considered fixed.
Still need to write some unit tests before this issue is marked as
resolved.
Graham,
I've committed the following unit tests for MODPYTHON-98:
test_req_add_bad_handler
test_req_add_empty_handler_string
test_accesshandler_add_handler_to_empty_hl
Can you take a look and let me know if you think these properly cover
the issue? If they look ok I'll roll the 3.2.6 beta.
I get a failure on test_req_add_empty_handler_string. I don't know if
this is because of other local hacks I have in place or not. But for it
to pass I need the following change to the test.py:
Index: test.py
===================================================================
--- test.py (revision 368329)
+++ test.py (working copy)
@@ -516,8 +516,8 @@
f = open(os.path.join(SERVER_ROOT, "logs/error_log"))
log = f.read()
f.close()
- if log.find("contains no 'handler'") == -1:
- self.fail("""Could not find "contains no 'handler'" in
error_log""")
+ if log.find("No module named") == -1:
+ self.fail("""Could not find "No module named" in
error_log""")
def test_accesshandler_add_handler_to_empty_hl_conf(self):
# Note that there is no PythonHandler specified in the the
VirtualHost
The messages in the error log being:
[Thu Jan 12 21:39:35 2006] [notice] mod_python: (Re)importing module ''
[Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHandler :
Traceback (most recent call last):
[Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHandler :
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/mod_python/apache.py", line 284, in
HandlerDispatch\n log=debug)
[Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHandler :
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/mod_python/apache.py", line 468, in
import_module\n f, p, d = imp.find_module(parts[i], path)
[Thu Jan 12 21:39:35 2006] [error] [client 127.0.0.1] PythonHandler :
ImportError: No module named
Graham