diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-12 11:54:43 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-21 08:12:25 +0100 |
commit | 0eff207dff226e13ada970c10a47e88da8ee5686 (patch) | |
tree | a26ca2254e167228af5a0886cead26505da6b8e7 /mediagoblin/tests/test_auth.py | |
parent | 950124e640913e150088d8644506aceaadd7ef49 (diff) | |
download | mediagoblin-0eff207dff226e13ada970c10a47e88da8ee5686.tar.lz mediagoblin-0eff207dff226e13ada970c10a47e88da8ee5686.tar.xz mediagoblin-0eff207dff226e13ada970c10a47e88da8ee5686.zip |
tests/auth: Don't rely on case sensitive error strings
webob's 404 status is "404 NOT FOUND" while werkzeug's is
"404 Not Found". Our test suite was checking the upper case string
for equality. Just test the status error code "404" rather than the
full string which might change at some points/versions and should
not need to be tested.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r-- | mediagoblin/tests/test_auth.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py index 06365161..169b2309 100644 --- a/mediagoblin/tests/test_auth.py +++ b/mediagoblin/tests/test_auth.py @@ -266,7 +266,7 @@ def test_register_views(test_app): response = test_app.get( "/auth/forgot_password/verify/?userid=%s&token=total_bs" % unicode( new_user.id), status=404) - assert_equal(response.status, '404 Not Found') + assert_equal(response.status.split()[0], u'404') # status="404 NOT FOUND" ## Try using an expired token to change password, shouldn't work template.clear_test_template_context() @@ -275,7 +275,7 @@ def test_register_views(test_app): 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') + assert_equal(response.status.split()[0], u'404') # status="404 NOT FOUND" new_user.fp_token_expire = real_token_expiration new_user.save() |