Various small fixes and also some basic tests for the auth framework

This commit is contained in:
2010-06-08 00:55:23 +01:00
parent 4c98788739
commit 254d4a2cd6
2 changed files with 31 additions and 11 deletions

10
tests.py Normal file
View File

@@ -0,0 +1,10 @@
from auth import DredditAuthBackend
import unittest
class AuthLogin(unittest.TestCase):
def setUp(self):
self.auth = DredditAuthBackend()
def testLogin(self):
self.assertEquals(self.auth.authenticate(username='invaliduser', password='asdasd'), None)
self.assertTrue(self.auth.authenticate(username='testuser', password='testtest'))