From 655e224d684eec1e1ef154301709ec10d7566d72 Mon Sep 17 00:00:00 2001 From: ThrawnCA Date: Thu, 18 Apr 2024 21:30:23 +1000 Subject: [PATCH] adjust test syntax to match other tests, #4193 - Pass API token via 'headers' parameter instead of 'extra_environ' --- ckan/tests/controllers/test_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckan/tests/controllers/test_user.py b/ckan/tests/controllers/test_user.py index 30f5b91acbd..0c5801e284b 100644 --- a/ckan/tests/controllers/test_user.py +++ b/ckan/tests/controllers/test_user.py @@ -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={ @@ -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