Reload the user for current values.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Sun, 26 Feb 2012 14:14:50 +0000 (15:14 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Mon, 26 Mar 2012 18:31:36 +0000 (20:31 +0200)
This might not be needed, but it helped at one point.

mediagoblin/tests/test_auth.py

index 3a33c66c519ef31e6544abb0a339d17c9945de28..8f988af37d53c4ff418188e64184899de59a8b1a 100644 (file)
@@ -269,6 +269,7 @@ def test_register_views(test_app):
 
     ## Try using an expired token to change password, shouldn't work
     template.clear_test_template_context()
+    new_user = mg_globals.database.User.find_one({'username': 'happygirl'})
     real_token_expiration = new_user.fp_token_expire
     new_user.fp_token_expire = datetime.datetime.now()
     new_user.save()