Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Commit

Permalink
Add support for './manage.py test'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie committed Apr 10, 2012
1 parent 6090147 commit 7f98d4b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manage.py
@@ -0,0 +1,14 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testsettings")

from django.core.management import execute_from_command_line

args = sys.argv
if len(args) == 2 and args[1] == 'test':
args.append('emailusernames')

execute_from_command_line(args)
16 changes: 16 additions & 0 deletions testsettings.py
@@ -0,0 +1,16 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
},
}

INSTALLED_APPS = (
'emailusernames',
'django.contrib.auth',
'django.contrib.contenttypes',
)

AUTHENTICATION_BACKENDS = (
'emailusernames.backends.EmailAuthBackend',
)

0 comments on commit 7f98d4b

Please sign in to comment.