Another issue:
Testing controller-actions is not considered unit-testing, as it relies on an 
external dependancy that is supposed to be generated by the framework.
In web2py it's even worse - you have to prepare an entier execution 
environment, as is done in this experiment... Generally, treating these kinds 
of tests as unit-tests is considered a mistake. They should be researven for 
the much-less-frequent integration-tests, and then use actual template-parsing. 
This is why it is suggested that such code should be extremely short, and have 
it mostly call other modules.
If you really want to treate your controllers as viable for unit-testing, than 
the environment should be mocked/faked, and not constructed using the actual 
framework. Also, the templates should not be used - the tests should recieve 
whatever the templates would recieve in production.
Then, for unit-testing the templates, a mocked-out representation of the 
environment and controller-output should be used, but using the actual 
templating-engine.
What are your thoughts on that?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to