List Info

Thread: running unit tests on Plone 2.5.2




running unit tests on Plone 2.5.2
user name
2007-02-01 13:36:36
Hi all,

I hope this is the right list for this question.

I just installed a fresh Plone 2.5.2 using the Universal/Unified Linux Installer from http://plone.org/products/plone . Pretty neat installer! Everything went well on my old G4. As a result, I have the default ZEO cluster with two clients and a shared Products/ directory, in which I dumped my products as usual.

I am now trying to run my unit tests and I can't get them to work. On 2.5.1 I was getting the known 'test_user_1_'; error. Now I'm getting the following "AttributeError: plone"; error:

$ python ./runalltests.py

...

Traceback (most recent call last):
  File "/opt/Plone-2.5.2/lib/python/Testing/ZopeTestCase/profiler.py", line 86, in __call__
    self.setUp()
  File "/opt/Plone-2.5.2/lib/python/Testing/ZopeTestCase/PortalTestCase.py", line 60, in setUp
    self.portal = self._portal()
  File "/opt/Plone-2.5.2/zeocluster/client1/Products/PloneTestCase/PloneTestCase.py", line 70, in _portal
    return self.getPortal(1)
  File "/opt/Plone-2.5.2/zeocluster/client1/Products/PloneTestCase/PloneTestCase.py", line 83, in getPortal
    return getattr(self.app, portal_name)
AttributeError: plone

I get the same error when running individual tests: python ./test_blah.py

$ env | grep _HOME

SOFTWARE_HOME=/opt/Plone-2.5.2/lib/python/
INSTANCE_HOME=/opt/Plone-2.5.2/zeocluster/client1/

I would like to know if the 'test_user_1_'; is something still present in Plone 2.5.2 as installed by the Super Universal Unified Linux Installer (which installs Zope 2.9.6 if I'm not mistaken).

Also, any hints on why I'm getting this AttributeError? Are INSTANCE_HOME and SOFTWARE_HOME ok? Am I doing something wrong?

Thanks a lot, I will feel much more comfortable once I see the tests running (and passing!).

--
Powered by tofu
Re: running unit tests on Plone 2.5.2
user name
2007-02-02 04:36:00
Forget about runalltests.py. Since Zope 2.9 your *must* use
Zope's  
testrunner, i.e. ./bin/zopectl test -s Products.CMFPlone

Stefan


On 1. Feb 2007, at 20:36, Juan Pablo Di Lelle wrote:

> $ python ./runalltests.py

--
Anything that, in happening, causes something else to
happen,
causes something else to happen.  --Douglas Adams



_______________________________________________
Setup mailing list
Setuplists.plone.org
http://
lists.plone.org/mailman/listinfo/setup

Re: running unit tests on Plone 2.5.2
user name
2007-02-02 13:55:17
On Fri, 02 Feb 2007 02:36:00 -0800, Stefan H. Holek  
<stefanepy.co.at> wrote:

> Forget about runalltests.py. Since Zope 2.9 your *must*
use Zope's  
> testrunner, i.e. ./bin/zopectl test -s
Products.CMFPlone

Can we remove that file since it doesn't do anything useful,
then? 

-- 
Alexander Limi ยท http://limi.net


_______________________________________________
Setup mailing list
Setuplists.plone.org
http://
lists.plone.org/mailman/listinfo/setup

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )