Refactor forms and views a bit. Add more validation to forms

This commit is contained in:
Matt Wright
2012-08-23 14:56:35 -04:00
parent b0b09aea49
commit 57595bbab4
5 changed files with 152 additions and 131 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class SecurityTest(TestCase):
headers=headers)
def register(self, email, password='password'):
data = dict(email=email, password=password, password_confirm=password)
data = dict(email=email, password=password)
return self.client.post('/register', data=data, follow_redirects=True)
def authenticate(self, email="matt@lp.com", password="password", endpoint=None, **kwargs):
+1 -1
View File
@@ -59,7 +59,7 @@ class DefaultSecurityTests(SecurityTest):
def test_bad_password(self):
r = self.authenticate(password="bogus")
self.assertIn("Password does not match", r.data)
self.assertIn("Invalid password", r.data)
def test_inactive_user(self):
r = self.authenticate("tiya@lp.com", "password")