Updating tests to reflect we redirect to the user's page after verification now.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 1 Aug 2011 13:34:50 +0000 (08:34 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 1 Aug 2011 13:34:50 +0000 (08:34 -0500)
mediagoblin/tests/test_auth.py

index f0bb183fe5e5d6e3e9c52a3fcf6445a65e8395ac..4781dd9b5d01aae16318fce2e8fbf5fba2484960 100644 (file)
@@ -190,12 +190,14 @@ def test_register_views(test_app):
 
     ## Try verifying with bs verification key, shouldn't work
     util.clear_test_template_context()
-    test_app.get(
+    response = test_app.get(
         "/auth/verify_email/?userid=%s&token=total_bs" % unicode(
             new_user['_id']))
+    response.follow()
     context = util.TEMPLATE_TEST_CONTEXT[
         'mediagoblin/user_pages/user.html']
-    assert context['verification_successful'] == False
+    # assert context['verification_successful'] == True
+    # TODO: Would be good to test messages here when we can do so...
     new_user = mg_globals.database.User.find_one(
         {'username': 'happygirl'})
     assert new_user
@@ -204,10 +206,12 @@ def test_register_views(test_app):
 
     ## Verify the email activation works
     util.clear_test_template_context()
-    test_app.get("%s?%s" % (path, get_params))
+    response = test_app.get("%s?%s" % (path, get_params))
+    response.follow()
     context = util.TEMPLATE_TEST_CONTEXT[
         'mediagoblin/user_pages/user.html']
-    assert context['verification_successful'] == True
+    # assert context['verification_successful'] == True
+    # TODO: Would be good to test messages here when we can do so...
     new_user = mg_globals.database.User.find_one(
         {'username': 'happygirl'})
     assert new_user