[Zope-CMF] Running cmf-1.4.2 tests under zope 2.7.0?
Paul Winkler
pw_lists at slinkp.com
Thu May 27 16:32:57 EDT 2004
On Thu, May 27, 2004 at 04:16:29PM -0400, Paul Winkler wrote:
> Still getting the same error on my own test suite, though...
> dunno why yet...
This is really puzzling. Any ideas?
I run the test suite (included below) like so:
$ python2.3 testrunner.py -f /home/pw/ZopeInstanceHome/Products/CMFBrandedContent/tests/test_minimal.py
And the error I get is:
<begin of stdout>
$ python2.3 testrunner.py -f /home/pw/ZopeInstanceHome/Products/CMFBrandedContent/tests/test_minimal.py
Adding /home/pw/Zope-2.7.0/lib/python to sys.path.
Running: /home/pw/ZopeInstanceHome/Products/CMFBrandedContent/tests/test_minimal.py
testTest (test_minimal.TestDemo) ... AttributeError
======================================================================
ERROR: testTest (test_minimal.TestDemo)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_minimal.py", line 11, in setUp
SecurityRequestTest.setUp(self)
File "/home/pw/ZopeInstanceHome/Products/CMFCore/tests/base/testcase.py", line 54, in setUp
SecurityTest.setUp(self)
File "/home/pw/ZopeInstanceHome/Products/CMFCore/tests/base/testcase.py", line 41, in setUp
self.connection = Zope.DB.open()
AttributeError: 'NoneType' object has no attribute 'open'
----------------------------------------------------------------------
Ran 1 test in 0.002s
FAILED (errors=1)
======================================================================
OVERALL FAILED (total errors=1)
</end of stdout>
... Finally, here's the entire contents of the test file - this is
really stripped down just to see if i can get the test suite working:
<begin test_minimal.py>
import Zope
from unittest import TestCase, TestSuite, makeSuite, main
from Products.CMFCore.tests.base.testcase import SecurityRequestTest, \
TransactionalTest
class TestDemo(SecurityRequestTest, TransactionalTest):
def setUp(self):
SecurityRequestTest.setUp(self)
def testTest(self):
pass
def test_suite():
return TestSuite((
makeSuite(TestDemo),
))
if __name__ == '__main__':
main(defaultTest='test_suite')
</end test_minimal.py>
--
Paul Winkler
http://www.slinkp.com
More information about the Zope-CMF
mailing list