[Zope] Offline testing

John R. Daily jdaily@progeny.com
Mon, 26 Feb 2001 13:13:23 -0500


I'm attempting to run offline unit tests (via PyUnit, importing the
Zope module with Zope turned off) against some functionality I've
written via Python Scripts. The error messages are not helping much,
and the online tests work fine, so I'm at a loss to troubleshoot this.

Any suggestions on how to interpret the following, or pointers to Zope
troubleshooting resources that would help, would be greatly appreciated.

Essentially, I have a /lib/issue/add_issue Python script which takes a
string argument and creates a new folder by that name in a certain
path. The add_issue script acts under a proxy to run as a Manager.

Run: 4 ; Failures: 0; Errors: 1
There was 1 error:
1) issues.issuesTest.runTest
Traceback (innermost last):
  File "issues.py", line 45, in runTest
    id.append(libissue.add_issue(self.type))
  File "/usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py", line 324, in __call__
    return self._bindAndExec(args, kw, None)
  File "/usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py", line 353, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/usr/lib/zope/lib/python/Products/PythonScripts/PythonScript.py", line 330, in _exec
    result = apply(f, args, kw)
  File "Script (Python)", line 32, in add_issue
  File "/usr/lib/zope/lib/python/OFS/PropertyManager.py", line 355, in manage_changeProperties
    return self.manage_propertiesForm(self,REQUEST,manage_tabs_message=message)
  File "/usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py", line 324, in __call__
    return self._bindAndExec(args, kw, None)
  File "/usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py", line 353, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/usr/lib/zope/lib/python/App/special_dtml.py", line 236, in _exec
    try: result = render_blocks(self._v_blocks, ns)
  File "/usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py", line 337, in __render_with_namespace__
    return self._bindAndExec((), namevals, namespace)
  File "/usr/lib/zope/lib/python/Shared/DC/Scripts/Bindings.py", line 353, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/usr/lib/zope/lib/python/App/special_dtml.py", line 236, in _exec
    try: result = render_blocks(self._v_blocks, ns)
  File "/usr/lib/zope/lib/python/DocumentTemplate/DT_Let.py", line 146, in render
    else: d[name]=expr(md)
  File "/usr/lib/zope/lib/python/DocumentTemplate/DT_Util.py", line 334, in eval
    return eval(code,globals,d)
  File "<string>", line 0, in ?
  File "/usr/lib/zope/lib/python/DocumentTemplate/DT_Util.py", line 127, in careful_getattr
    try: v=getattr(inst, name)
AttributeError: 'None' object has no attribute 'get'

--                                                                   --
John R. Daily                                        jdaily@progeny.com
Systems Programmer                                Progeny Linux Systems
		  Master of the ephemeral epiphany