Skip to content

Commit

Permalink
[ckan#3121] Change test to prevent deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
brew authored and Knut Hühne committed Jul 4, 2016
1 parent 8e04cb8 commit 3825637
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ckan/tests/controllers/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ def test_user_logout_url_redirect(self):

@helpers.change_config('ckan.root_path', '/my/prefix')
def test_non_root_user_logout_url_redirect(self):
'''_logout url redirects to logged out page.
'''
_logout url redirects to logged out page with `ckan.root_path`
prefixed.
Note: this doesn't test the actual logout of a logged in user, just
the associated redirect.
Expand All @@ -183,10 +185,8 @@ def test_non_root_user_logout_url_redirect(self):

logout_url = url_for(controller='user', action='logout')
logout_response = app.get(logout_url, status=302)
try:
final_response = helpers.webtest_maybe_follow(logout_response)
except Exception as e:
assert_true('/my/prefix/user/logout' in e.message)
assert_equal(logout_response.status_int, 302)
assert_true('/my/prefix/user/logout' in logout_response.location)


class TestUser(helpers.FunctionalTestBase):
Expand Down

0 comments on commit 3825637

Please sign in to comment.