File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 11Changelog
22=========
33
4+ [unreleased]
5+ ------------
6+
7+ Fixed
8+ ^^^^^
9+ - Werkzeug engine now correctly serializes list query parameters (``attributes ``, ``excludedAttributes ``).
10+
411[0.7.4] - 2026-04-02
512--------------------
613
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ def query(
161161 ** kwargs ,
162162 )
163163
164- query_string = urlencode (req .payload , doseq = False ) if req .payload else None
164+ query_string = urlencode (req .payload , doseq = True ) if req .payload else None
165165 environ = {** self .environ , ** req .request_kwargs }
166166 response = self .client .get (
167167 self ._make_url (req .url ), query_string = query_string , ** environ
Original file line number Diff line number Diff line change 11import pytest
22from scim2_models import PatchOp
33from scim2_models import PatchOperation
4+ from scim2_models import ResponseParameters
45from scim2_models import SearchRequest
56from scim2_models import User
67from werkzeug .test import Client
@@ -77,6 +78,18 @@ def test_werkzeug_engine(scim_client):
7778 scim_client .query (User , response_user .id )
7879
7980
81+ def test_werkzeug_query_with_attributes (scim_client ):
82+ """List query parameters like attributes are correctly serialized in the query string."""
83+ User = scim_client .get_resource_model ("User" )
84+ request_user = User (user_name = "foo" , display_name = "bar" , title = "Engineer" )
85+ response_user = scim_client .create (request_user )
86+
87+ params = ResponseParameters (attributes = ["displayName" ])
88+ result = scim_client .query (User , response_user .id , query_parameters = params )
89+ assert result .display_name == "bar"
90+ assert result .title is None
91+
92+
8093def test_no_json ():
8194 """Test that pages that do not return JSON raise an UnexpectedContentFormat error."""
8295
You can’t perform that action at this time.
0 commit comments