Updating tests to reflect we redirect to the user's page after verification now.

This commit is contained in:
Christopher Allan Webber 2011-08-01 08:34:50 -05:00
parent 65e7ce634c
commit a656ccd561

View 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