Permalink
Browse files

Merge remote-tracking branch 'brad/tests'

  • Loading branch information...
Dan Fairs
Dan Fairs committed Mar 24, 2013
2 parents 0873d26 + 3ba2151 commit 035012d1e7f39d5c31c64911d0622767314f5a2f
Showing with 17 additions and 4 deletions.
  1. +7 −0 README → README.rst
  2. +2 −1 test-requirements.txt
  3. +6 −2 testproject/manage.py
  4. +2 −1 testproject/settings.py
View
@@ -8,3 +8,10 @@ they can convert their temporary user account to a real user account.
`Read the full documentation`_.
.. _Read the full documentation: http://django-lazysignup.readthedocs.org/
+
+Tests
+=====
+
+To run the tests, do the following::
+
+(cd testproject && python manage.py test lazysignup)
View
@@ -1 +1,2 @@
-mock==1.0b1
+Django>=1.4
+mock>=1.0
View
8 testproject/manage.py 100644 → 100755
@@ -1,14 +1,18 @@
#!/usr/bin/env python
from django.core.management import execute_manager
-import imp
+import imp, os, sys
+
+
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
- import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
sys.exit(1)
import settings
+path = os.path.realpath(os.path.dirname(__file__))
+sys.path.append(os.path.join(path, '..'))
+
if __name__ == "__main__":
execute_manager(settings)
View
@@ -1,5 +1,5 @@
# Settings to be used when running unit tests
-# python manage.py test --settings=lazysignup.test_settings lazysignup
+# python manage.py test lazysignup
DATABASES = {
'default': {
@@ -32,6 +32,7 @@
]
ROOT_URLCONF = 'testproject.urls'
+SECRET_KEY = 'non-empty-key'
SECRET_KEY = '12345'

0 comments on commit 035012d

Please sign in to comment.