[Zope-CMF] Re: View classes / testing

yuppie y.2005- at wcm-solutions.de
Tue Oct 18 06:00:57 EDT 2005


Hi pete!


pete wrote:
> I've been looking at making a view class for the RSS syndication in 
> CMFDefault, and I've got all the forms and templates working fine.

Great!

> So 
> now it's on to testing!
> 
> Has anyone written many tests for a view class?  I'm not quite sure how 
> to set the tests up, i.e. put the request and context in the right 
> place.  If there is an example floating round, please point me in the 
> right direction!

Can't help you with that, I still have to figure that out myself.

> Also, what's the approach to backwards compatibility.  For example, in 
> the goldegg_folder_contents branch, the templates all fail gracefully if 
> the view class is not available, by calling python scripts or whatever. 
>  And the templates have remained in the skins folder rather than moving 
> somewhere new.  Is this the general approach?

So far there is no general approach. The goldegg_folder_contents branch 
is work in progress and not ready for merging.

It is quite easy to share templates between oldstyle skins and views. 
This allows to make using views optional. But maybe that approach just 
makes sense for products that should work with CMF 1.5 *and* CMF 2.0.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list