[Zope] ZopeTestCase
Sylvain Thénault
Sylvain.Thenault at logilab.fr
Wed Jan 21 09:36:21 EST 2004
hi !
I've the following problems using ZopeTestCase (0.8.6) :
- when I add a second "test" method to a ZTC based test case, I get the
following traceback (the first test succeed) :
Traceback (most recent call last):
File "/usr/lib/zope/lib/python/Testing/ZopeTestCase/ZopeTestCase.py",
line 105, in setUp
self._setupFolder()
File "/usr/lib/zope/lib/python/Testing/ZopeTestCase/ZopeTestCase.py",
line 124, in _setupFolder
self.app.manage_addFolder(folder_name)
File "/usr/lib/zope/lib/python/OFS/Folder.py", line 46, in
manage_addFolder
self._setObject(id, ob)
File "/usr/lib/zope/lib/python/OFS/ObjectManager.py", line 244, in
_setObject
v=self._checkId(id)
File "/usr/lib/zope/lib/python/OFS/ObjectManager.py", line 77, in
checkValidId raise BadRequestException, ('The id "%s" is invalid--'
Bad Request: The id "test_folder_1_" is invalid--it is already in use.
Note I don't have a tearDown method defined in my own test classe.
- I'm using ZopeTestCase in combinaison with mechanicalcat [1] to do
some functionnal tests. Using mechanicalcat to post a form which
leads to some objects modifications (objects which had have been
created in the afterSetUp method) works fine. The problem is that if
I access to those objects using self.app, I get the old version of
the object, but I get the updated version using self._app().
I guess I'm missing something with both problem... Any idea ?
[1] http://www.mechanicalcat.net/tech/webunit/
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
More information about the Zope
mailing list