fix tests, hopefully

This commit is contained in:
Matt Wright
2012-08-15 10:25:07 -04:00
parent 64467b0338
commit 022836c43c
+13 -6
View File
@@ -464,7 +464,6 @@ class PasswordlessTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_PASSWORDLESS': True,
'SECURITY_LOGIN_WITHIN': '2 seconds'
}
def test_login_requset_for_inactive_user(self):
@@ -498,6 +497,19 @@ class PasswordlessTests(SecurityTest):
r = self.client.get('/profile')
self.assertIn('Profile Page', r.data)
def test_invalid_login_token(self):
msg = self.app.config['SECURITY_MSG_INVALID_LOGIN_TOKEN'][0]
r = self._get('/auth/bogus', follow_redirects=True)
self.assertIn(msg, r.data)
class ExpiredLoginTokenTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_PASSWORDLESS': True,
'SECURITY_LOGIN_WITHIN': '1 seconds'
}
def test_expired_login_token_sends_email(self):
e = 'matt@lp.com'
@@ -518,11 +530,6 @@ class PasswordlessTests(SecurityTest):
msg = self.app.config['SECURITY_MSG_LOGIN_EXPIRED'][0] % dict(within=expire_text, email=e)
self.assertIn(msg, r.data)
def test_invalid_login_token(self):
msg = self.app.config['SECURITY_MSG_INVALID_LOGIN_TOKEN'][0]
r = self._get('/auth/bogus', follow_redirects=True)
self.assertIn(msg, r.data)
class MongoEngineSecurityTests(DefaultSecurityTests):