I\'ve set up a django project with an admin page. It worked perfectly for the first couple weeks of development, didn\'t use the admin page for a while, and when I came bac
Try this; in tests.py:
from django.contrib import auth
class AuthTestCase(TestCase):
def setUp(self):
self.u = User.objects.create_user('test@dom.com', 'test@dom.com', 'pass')
self.u.is_staff = True
self.u.is_superuser = True
self.u.is_active = True
self.u.save()
def testLogin(self):
self.client.login(username='test@dom.com', password='pass')
Then run the test with python manage.py test . If this passes, the system is working, maybe look at the username and password to make sure they are acceptable.