-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with httpx 0.28.0 #277
Comments
Hi All, For some reasons I couldn't find out, the httpcore mocker ( A workaround that is working for me at least is to switch to the httpx mocker ( # Build your mocked responses here
mocked_resp1 = ...
mocked_resp2 = ...
mocked_resp3 = ...
# Mocked API service
async with respx.mock(base_url=base_url_mock, using="httpx") as respx_mock:
respx_mock.get("/", name="$service_document$").mock(mocked_resp1)
respx_mock.get("/$metadata", name="$metadata$").mock(mocked_resp2)
respx_mock.head("/", name="$csrf_token$").mock(mocked_resp3)
yield respx_mock The difference is the argument Cheers |
Hey, I've raised a fix in #278, please let me know if that helps. |
When upgrading httpx from 0.27.2 to 0.28.0, the mocks that were previously correctly detected as mocked, stop being considered as so and raise an
AllMockedAssertionError
.The text was updated successfully, but these errors were encountered: