aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_auth.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-11-14 19:24:15 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-05 21:08:58 +0100
commit2d540fed8b511c76819a836da3d62875d20b6547 (patch)
tree17c4719ef1145109d12bfa6ec9138f60162f4808 /mediagoblin/tests/test_auth.py
parentdc39e4555c9e104ae9d7b38f231a848fe106d1a0 (diff)
downloadmediagoblin-2d540fed8b511c76819a836da3d62875d20b6547.tar.lz
mediagoblin-2d540fed8b511c76819a836da3d62875d20b6547.tar.xz
mediagoblin-2d540fed8b511c76819a836da3d62875d20b6547.zip
Dot-Notation for Users.fp_token_expire
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r--mediagoblin/tests/test_auth.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py
index 2dcb5c14..d3b8caf1 100644
--- a/mediagoblin/tests/test_auth.py
+++ b/mediagoblin/tests/test_auth.py
@@ -274,7 +274,7 @@ def test_register_views(test_app):
### The forgotten password token should be set to expire in ~ 10 days
# A few ticks have expired so there are only 9 full days left...
- assert (new_user['fp_token_expire'] - datetime.datetime.now()).days == 9
+ assert (new_user.fp_token_expire - datetime.datetime.now()).days == 9
## Try using a bs password-changing verification key, shouldn't work
template.clear_test_template_context()
@@ -285,12 +285,12 @@ def test_register_views(test_app):
## Try using an expired token to change password, shouldn't work
template.clear_test_template_context()
- real_token_expiration = new_user['fp_token_expire']
- new_user['fp_token_expire'] = datetime.datetime.now()
+ real_token_expiration = new_user.fp_token_expire
+ new_user.fp_token_expire = datetime.datetime.now()
new_user.save()
response = test_app.get("%s?%s" % (path, get_params), status=404)
assert_equal(response.status, '404 Not Found')
- new_user['fp_token_expire'] = real_token_expiration
+ new_user.fp_token_expire = real_token_expiration
new_user.save()
## Verify step 1 of password-change works -- can see form to change password