appengine unittesting trick

Auteur: 
fraka6

I was looking for the ideal way to run all my unittests on my appengine projects. Let's define what is ideal:

Solution:

  • install gaeunit
  • create or move unittest classes directly in file that it is testing
  • create /test/project_unittest.py
  • import all file containing unittest class in project_unittest.py

What's great with python is that unittest.main() run all unittests that are in the scope which means you simply have to import them and no need to create multiple test files if unittests classes are directly integrated in each files.