Skip to content

Commit

Permalink
adjust test syntax to match other tests, #4193
Browse files Browse the repository at this point in the history
- Pass API token via 'headers' parameter instead of 'extra_environ'
  • Loading branch information
ThrawnCA committed Apr 18, 2024
1 parent d28c121 commit 655e224
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/tests/controllers/test_user.py
Expand Up @@ -430,8 +430,8 @@ def test_edit_user_logged_in_username_change_by_id(self, app, user):

def test_edit_user_logged_in_username_change_by_sysadmin(
self, app, user, sysadmin):
env = {"Authorization": sysadmin["token"]}

headers = {"Authorization": sysadmin["token"]}
response = app.post(
url=url_for("user.edit", id=user["id"]),
data={
Expand All @@ -441,7 +441,7 @@ def test_edit_user_logged_in_username_change_by_sysadmin(
"password2": "",
"name": factories.User.stub().name,
},
extra_environ=env
headers=headers
)
assert 'Profile updated' in response

Expand Down

0 comments on commit 655e224

Please sign in to comment.