Skip to content

Commit

Permalink
get the tests running
Browse files Browse the repository at this point in the history
  • Loading branch information
brad committed Mar 18, 2013
1 parent 60ca323 commit 843be9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions testproject/manage.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 2 additions & 1 deletion testproject/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Settings to be used when running unit tests
# python manage.py test --settings=lazysignup.test_settings lazysignup
# python testproject/manage.py test lazysignup

DATABASES = {
'default': {
Expand Down Expand Up @@ -32,5 +32,6 @@
]

ROOT_URLCONF = 'testproject.urls'
SECRET_KEY = 'non-empty-key'

LAZYSIGNUP_USER_MODEL = 'lazysignup.CustomUser'

0 comments on commit 843be9a

Please sign in to comment.