Skip to content

[18.0][ADD] webservice_client_certificate_auth: new module#123

Open
vvrossem wants to merge 3 commits intoOCA:18.0from
camptocamp:18.0-add-webservice_client_certificate_auth
Open

[18.0][ADD] webservice_client_certificate_auth: new module#123
vvrossem wants to merge 3 commits intoOCA:18.0from
camptocamp:18.0-add-webservice_client_certificate_auth

Conversation

@vvrossem
Copy link

@vvrossem vvrossem commented Feb 3, 2026

No description provided.

@vvrossem vvrossem force-pushed the 18.0-add-webservice_client_certificate_auth branch from 9a9c865 to 2afcbb3 Compare February 3, 2026 12:57
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.
@vvrossem vvrossem marked this pull request as draft February 4, 2026 08:11
@vvrossem vvrossem marked this pull request as ready for review February 4, 2026 10:09
res = super()._setup_records()
cls.url = "https://localhost.demo.odoo/"
# Certificate and private key configuration
os.environ["SERVER_ENV_CONFIG"] = "\n".join(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertEqual(kwargs["cert"], ("/path/client.cert", "/path/client.key"))

def test_request_adapter_certificate_only(self):
with mock.patch("requests.request") as mock_request:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, I couldn't retrieve the request's kwargs using responses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants