I am struggling to run unit tests using the Django Client class on the Google App Engine. I downloaded GAEUnit (v2.0a for Django) and I am trying to use that as my testing framework (maybe I should rather be using something else?)
I copy all the GAEUnit files into my project root as instructed, and I modify my app.yaml file. Currently app.yaml looks as follows:
application: myapp
version: 1
runtime: python
api_version: 1
handlers:
- url: /static
static_dir: static
- url: /.*
script: django_bootstrap.py
- url: /test.*
script: gaeunit.py
I also modified settings.py to add gaeunit as an application... (snippet from settings.py)
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.contenttypes',
'gaeunit',
)
My unit test class resides in the 'test' folder and looks as follows (very simple):
import unittest
class Test(unittest.TestCase):
def testName(self):
self.assertTrue(False)
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()
However, when I try to run my application by navigating to http://localhost:8080, it fails with the following error:
ViewDoesNotExist at /
Could not import gaeunit.gaeunit. Error was: No module named gaeunit
gaeunit.py does definitely exist in the folder. What am I doing wrong?