Files
django-testauth/django-testauth/tests.py
2012-10-19 23:30:34 +01:00

11 lines
364 B
Python

from auth import TESTAuthBackend
import unittest
class AuthLogin(unittest.TestCase):
def setUp(self):
self.auth = TESTAuthBackend()
def testLogin(self):
self.assertEquals(self.auth.authenticate(username='invaliduser', password='asdasd'), None)
self.assertTrue(self.auth.authenticate(username='testuser', password='testtest'))