If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!
How do you unit test the controller/action?
post = Post('list_all')
My first thought would be to mock the post handler Post('list_all') but not sure how this is done since the object is instantiated inside the action and is not injected via a method or constructor. So when I unit test this it fails when trying to access the session object downstream, when the handler instantiates the MyApp class.
I come from the .NET world where it is common to mock the dependencies of the class under test, and that's it.
But I'm not sure how to do it in this case? Could you help out?
Create your datamodels in modules