Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix tests

  • Loading branch information...
commit 39b7cd72eba929abdd2428cb69d51a6f364753dd 1 parent dd52ee5
@vangheem vangheem authored
Showing with 7 additions and 5 deletions.
  1. +4 −4 factored/auth.py
  2. +3 −1 factored/tests/test_auth.py
View
8 factored/auth.py
@@ -37,13 +37,13 @@ def getFactoredPlugin(name):
class UsernameSchema(BaseSchema):
username = validators.MinLength(3, not_empty=True)
- referrer = validators.MinLength(0)
+ referrer = validators.UnicodeString(if_missing=u'')
class CodeSchema(BaseSchema):
username = validators.MinLength(3, not_empty=True)
code = validators.MinLength(4, not_empty=True)
- referrer = validators.MinLength(0)
+ referrer = validators.UnicodeString(if_missing=u'')
class BaseAuthView(object):
@@ -197,13 +197,13 @@ def check_code(self, user):
class EmailAuthSchema(BaseSchema):
username = validators.Email(not_empty=True)
- referrer = validators.MinLength(0)
+ referrer = validators.UnicodeString(if_missing=u'')
class EmailAuthCodeSchema(BaseSchema):
username = validators.Email(not_empty=True)
code = validators.MinLength(8, not_empty=True)
- referrer = validators.MinLength(0)
+ referrer = validators.UnicodeString(if_missing=u'')
class EmailAuthView(BaseAuthView):
View
4 factored/tests/test_auth.py
@@ -58,7 +58,9 @@ def get_request(self, *args, **kwargs):
'body': "You're temporary access code is: {code}"},
'auth_tkt': auth_tkt,
'email_auth_window': 120,
- 'static_path': '/auth/static'
+ 'static_path': '/auth/static',
+ 'allowgooglecodereminder_settings': {},
+ 'allowgooglecodereminder': False
}
req.environ['who_api'] = APIFactory(
[('auth_tkt', auth_tkt)],
Please sign in to comment.
Something went wrong with that request. Please try again.