Skip to content

Commit 4b7b624

Browse files
committed
[FIX] webservice: fix test failure with extended auth types
The test `test_oauth2_flow_compute_with_ui` iterates over all available `auth_type` values. When a module extends `webservice` with an additional `auth_type` (e.g., `client_certificate`), this test fails because it does not know how to populate the new required fields for that type. This commit restricts the test loop to the authentication types defined in `webservice` module.
1 parent 2afcbb3 commit 4b7b624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webservice/tests/test_oauth2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def test_oauth2_flow_compute_with_ui(self):
285285
form_xmlid = "webservice.webservice_backend_form_view"
286286
for auth_type, oauth2_flow in [
287287
(tp, fl)
288-
for tp in ws._fields["auth_type"].get_values(ws.env)
288+
for tp in ["none", "user_pwd", "api_key", "oauth2"]
289289
for fl in ws._fields["oauth2_flow"].get_values(ws.env)
290290
]:
291291
next_ws_id = ws.sudo().search([], order="id desc", limit=1).id + 1

0 commit comments

Comments
 (0)