mirror of
https://github.com/wassname/flask-security.git
synced 2026-08-15 12:25:00 +08:00
Refactor forms and views a bit. Add more validation to forms
This commit is contained in:
+1
-1
@@ -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):
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user