Permalink
Browse files

Add support for './manage.py test'

  • Loading branch information...
1 parent 6090147 commit 7f98d4b0b76936a2fcce72518cf38ac07fbdc0a2 @tomchristie tomchristie committed Apr 10, 2012
Showing with 30 additions and 0 deletions.
  1. +14 −0 manage.py
  2. +16 −0 testsettings.py
View
@@ -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)
View
@@ -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.