[Grok-dev] How does one unittest a view?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Wed Apr 8 11:14:26 EDT 2009


Wichert Akkerman wrote:
> Previously Jan-Wijbrand Kolman wrote:
>> I wonder how this would work in a vanilla Zope 3 context though...
> 
> One uses zope.component.testing.PlacelessSetup and manually calls
> provideAdapter & friends when needed.

Hmm, right.

Then this seems to be a problematic area for right now in that sense, as
the grokking process (at least in this case, for View components) mixes
performing CA registrations and "setting up things on the View component
itself".

Not sure how to decouple things. Maybe by splitting the View grokker
into two; one for registrations part and one for the "setting up
things"-part and somehow have a way to invoke only one when unittesting.
Hand-waving here obviously.


regards,
jw








More information about the Grok-dev mailing list