fastmcp/tests/client
Giovanna Zanardini a6ddde27df
Allow OAuth instance to use the same httpx factory as the Transport (#2324)
* Allow OAuth instance to use the same httpx factory as the Transport

* Fix test

* Update SSL verification mode assertion in tests

* This is actually not needed

* Creating a Client instance is not needed for this test

* Fix test

* Apply httpx_client_factory fix to SSETransport

Extends the OAuth httpx_client_factory changes to SSETransport.
SSETransport had the same issues as StreamableHttpTransport where it
wasn't passing the custom httpx client factory to OAuth, causing
certificate verification settings to be ignored during OAuth flows.

Changes:
- Set httpx_client_factory before calling _set_auth()
- Pass httpx_client_factory to OAuth constructor
- Add test for SSETransport OAuth client factory propagation

---------

Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-11-04 12:14:28 -05:00
..
auth Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
transports Allow OAuth instance to use the same httpx factory as the Transport (#2324) 2025-11-04 12:14:28 -05:00
__init__.py clean up test inits 2025-05-31 19:32:08 -04:00
test_client.py Add meta to call tool (#2206) 2025-11-04 10:25:52 -05:00
test_elicitation.py Bump ty to ==0.0.1a25 (#2350) 2025-11-02 20:02:45 -05:00
test_logs.py Fix log handler to accept any JSON-serializable data type (#2102) 2025-10-15 10:20:04 -07:00
test_notifications.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
test_oauth_callback_xss.py Escape all HTML to prevent XSS attack (#2090) 2025-10-14 12:30:21 -07:00
test_openapi_experimental.py Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
test_openapi_legacy.py Replace subprocess tests with in-process async servers (#2006) 2025-10-19 10:47:54 -04:00
test_progress.py Remove empty parens 2025-06-04 15:37:55 -04:00
test_roots.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
test_sampling.py Fallback to a Completions API when Sampling is not available (#1145) 2025-08-21 07:49:29 -04:00
test_sse.py Remove test warnings (#2331) 2025-11-01 14:53:51 -04:00
test_stdio.py feat: expose errlog on stdio transport (#1991) 2025-10-11 18:33:06 -04:00
test_streamable_http.py Bump ty to ==0.0.1a25 (#2350) 2025-11-02 20:02:45 -05:00