running unit tests on Plone 2.5.2

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

<div><p>Hi all,<br><br>I hope this is the right list for this question.<br><br>I just installed a fresh Plone 2.5.2 using the Universal/Unified Linux Installer from <a href="http://plone.org/products/plone">http://plone.org/products/plone
</a> . 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.<br><br>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:<br><br>$ python ./runalltests.py<br><br>...<br><br>Traceback (most recent call last):<br>
&nbsp; File "/opt/Plone-2.5.2/lib/python/Testing/ZopeTestCase/profiler.py", line 86, in __call__<br>&nbsp;&nbsp;&nbsp; self.setUp()<br>&nbsp; File "/opt/Plone-2.5.2/lib/python/Testing/ZopeTestCase/PortalTestCase.py", line 60, in setUp
<br>&nbsp;&nbsp;&nbsp; self.portal = self._portal()<br>&nbsp; File "/opt/Plone-2.5.2/zeocluster/client1/Products/PloneTestCase/PloneTestCase.py", line 70, in _portal<br>&nbsp;&nbsp;&nbsp; return self.getPortal(1)<br>&nbsp; File "/opt/Plone-2.5.2/zeocluster/client1/Products/PloneTestCase/PloneTestCase.py", line 83, in getPortal
<br>&nbsp;&nbsp;&nbsp; return getattr(self.app, portal_name)<br>AttributeError: plone<br><br>I get the same error when running individual tests: python ./test_blah.py<br><br>$ env | grep _HOME<br><br>SOFTWARE_HOME=/opt/Plone-2.5.2/lib/python/
<br>INSTANCE_HOME=/opt/Plone-2.5.2/zeocluster/client1/≤br><br>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).<br><br>Also, any hints on why I'm getting this AttributeError? Are INSTANCE_HOME and SOFTWARE_HOME ok? Am I doing something wrong?<br><br>Thanks a lot, I will feel much more comfortable once I see the tests running (and passing!).
<br><br>-- <br>Powered by tofu
</p></div>
Stefan H. Holek | 2 Feb 11:36

Re: running unit tests on Plone 2.5.2

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

Alexander Limi | 2 Feb 20:55
Favicon
Gravatar

Re: running unit tests on Plone 2.5.2

On Fri, 02 Feb 2007 02:36:00 -0800, Stefan H. Holek  
<stefan@...> 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


Gmane