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

Wichert Akkerman wichert at wiggy.net
Wed Apr 8 10:14:16 EDT 2009


Previously Vanderson Mota dos Santos wrote:
> There is no silly questions, there is the ones that are easy or hard to
> answer.
> 
> "No. In a unittest nothing happens automatically. That's the whole point
> of unittests: you want to test things in isolation."
> 
> As far as i know, if you test a view, it is an acceptance testing.
> Well, i guess you will have to use the integration layer to make the test
> fixture easier to build.

There has to be a way to test a view in isolation without doing the
whole grok-a-package-and-setup-an-applicition thing. I can get things
working by manually setting some attributes on the View class (see my
other post), but since unit testing is an important thing to do I expect
grok to have a simpler way to do this.

Wichert.

-- 
Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.


More information about the Grok-dev mailing list