[Zope] ZopeTestCase and INSTANCE_HOME

zope at netchan.cotse.net zope at netchan.cotse.net
Fri Mar 5 16:14:13 EST 2004


I use the FileSystemSite product
(http://www.zope.org/Members/k_vertigo/Products/FileSystemSite) to serve
some static pages for the management pages of my product. If your static
content folder is under INSTANCE_HOME, FSS trims this prefix from the
path
(http://cvs.infrae.com/FileSystemSite/utils.py?rev=1.1&content-type=text
/vnd.viewcvs-markup - minimalpath method).
This means that the path you have to pass to createDirectoryView depends
on if your INSTANCE_HOME points to the home of your product or not.
A workaround for this is to check if INSTANCE_HOME really points to your
instance and set the filepath argument of createDirectoryView
(http://cvs.infrae.com/FileSystemSite/DirectoryView.py?rev=1.5&content-t
ype=text/vnd.viewcvs-markup) accrodingly, however this is a hack and I
hate hacks ;-)

Regards,
Sandor

> -----Original Message-----
> From: Chris Withers [mailto:lists at simplistix.co.uk] 
> Sent: Friday, March 05, 2004 4:56 AM
> To: zope at netchan.cotse.net
> Cc: zope at zope.org
> Subject: Re: [Zope] ZopeTestCase and INSTANCE_HOME
> 
> 
> zope at netchan.cotse.net wrote:
> 
> > Is there any way to prevent ZTC and/or the Testing package 
> from doing 
> > this?
> 
> Nope, just set the PRODUCTS_PATH environment variable to 
> where your products 
> really are...
> 
> cheers,
> 
> Chris
> 
> -- 
> Simplistix - Content Management, Zope & Python Consulting
>             - http://www.simplistix.co.uk
> 




More information about the Zope mailing list