[web2py] Re: unit testing web2py and app engine

2012-03-21 Thread David Phillips
I should have mentioned one other thing. Before running my unit test, I set the PYTHONPATH environment variable so that I could import the Google app engine libraries. export PYTHONPATH=~/dev/python/google/google_appengine_1.6.3_source/ google_appengine On Mar 21, 11:14 am, David Phillips wrote:

[web2py] Re: unit testing web2py and app engine

2012-03-21 Thread David Phillips
Thank you, howesc. I'll take a close look at your file. I finally cobbled together a file to unit test an object in my project that uses the unittest library, Google's memcache and the testbed library, and a web2py model. I am hoping it will scale up to test controller actions as well as individua

[web2py] Re: unit testing web2py and app engine

2012-03-21 Thread howesc
attached is a controller that i use, adapted from the testing tools in the admin interface. note that i set a request parameter 'test_db' and in models i detect that parameter and connect to a different namespace so that my tests run in a controlled DB environment - remember that if you want to