Add trackable option and make extra features default to off/False to minimize about of application setup to get started

This commit is contained in:
Matt Wright
2012-07-09 18:57:43 -04:00
parent 74e94b2628
commit 2ed0ea48e6
4 changed files with 61 additions and 8 deletions
+12 -2
View File
@@ -114,6 +114,7 @@ class DefaultSecurityTests(SecurityTest):
class ConfiguredURLTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_REGISTERABLE': True,
'SECURITY_AUTH_URL': '/custom_auth',
'SECURITY_LOGOUT_URL': '/custom_logout',
'SECURITY_LOGIN_VIEW': '/custom_login',
@@ -142,6 +143,9 @@ class ConfiguredURLTests(SecurityTest):
class RegisterableTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_REGISTERABLE': True
}
def test_register_valid_user(self):
data = dict(email='dude@lp.com', password='password', password_confirm='password')
@@ -152,7 +156,8 @@ class RegisterableTests(SecurityTest):
class ConfirmableTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_CONFIRMABLE': True
'SECURITY_CONFIRMABLE': True,
'SECURITY_REGISTERABLE': True
}
def test_register_sends_confirmation_email(self):
@@ -216,7 +221,8 @@ class ConfirmableTests(SecurityTest):
class LoginWithoutImmediateConfirmTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_CONFIRM_EMAIL': True,
'SECURITY_CONFIRMABLE': True,
'SECURITY_REGISTERABLE': True,
'SECURITY_LOGIN_WITHOUT_CONFIRMATION': True
}
@@ -230,6 +236,10 @@ class LoginWithoutImmediateConfirmTests(SecurityTest):
class RecoverableTests(SecurityTest):
AUTH_CONFIG = {
'SECURITY_RECOVERABLE': True
}
def test_forgot_post_sends_email_and_sets_required_fields(self):
with capture_reset_password_requests() as users:
with self.app.mail.record_messages() as outbox: