2 messages in net.sourceforge.lists.plone-usersRe: unit test question
FromSent OnAttachments
Wohnlich, Eric (IMS)Nov 1, 2006 11:28 am 
Raphael RitzNov 3, 2006 12:45 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: unit test questionActions...
From:Raphael Ritz (r.ri@public.gmane.org)
Date:Nov 3, 2006 12:45:18 am
List:net.sourceforge.lists.plone-users

Wohnlich, Eric (IMS) schrieb:

Basically, if I try to do "self.portal.myScript" in a test, where "myScript" is in the skins folder, I get an AttributeError. I assume it is possible to call a script that would be in the skins directory of my product, correct? And I know my product has installed the skins - for instance, the following test passes: def testSkins(self): skins = self.portal.portal_skins.objectIds() self.failUnless(PROJECTNAME in skins)

So I don't understand why I wouldn't be able to do unit tests on the scripts in my skins directory. Can anyone shed any light for me?

because in tests new skin layers aren't automatically added to the default search path on product installation.

optilude? andym?

Try adding

def afterSetUp(self): self._refreshSkinData()

to your test case class.

HTH,

Raphael

Thanks, Eric

------------------------------------------------------------------------ Information in this e-mail may be confidential. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender of the error.

------------------------------------------------------------------------

------------------------------------------------------------------------