Skip to content

Commit

Permalink
adjust test syntax to match other tests, ckan#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 19, 2024
1 parent d28c121 commit 4f04000
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckan/tests/controllers/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,18 +430,19 @@ 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={
"email": user["email"],
"save": "",
"old_password": "correct123",
"password1": "",
"password2": "",
"name": factories.User.stub().name,
},
extra_environ=env
headers=headers
)
assert 'Profile updated' in response

Expand Down

0 comments on commit 4f04000

Please sign in to comment.