3

How can I test web2py units that are intended to be run on GAE?

I learned to run tests using this method: python web2py.py -S api -M -R applications/api/tests/test.py

But how do I run tests with dev_appserver.py & web2py.py?

David Nehme
  • 21,379
  • 8
  • 78
  • 117
andrei
  • 315
  • 3
  • 7

1 Answers1

0

Unless you are testing requests, all you need to to do run unit tests is to have the Google App Engine SDK in your Python path.

I found it a little bit annoying so I built testable-appengine to automate the setup process (and add a couple nice things to the virtualenv it builds). It also has some interesting examples of how you can install third-party libraries for deployment alongside the application. I'd love to see how it works with Web2Py.

rbanffy
  • 2,319
  • 1
  • 16
  • 27