Skip to content
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

Add router context manager utility for asserting call count #248

Open
lundberg opened this issue Nov 30, 2023 · 0 comments
Open

Add router context manager utility for asserting call count #248

lundberg opened this issue Nov 30, 2023 · 0 comments

Comments

@lundberg
Copy link
Owner

e.g.

@respx.mock
def test_called():
    respx.get("https://example.com/foobar", name="foobar")
    respx.get("https://example.com/hamspam", name="hamspam")

    with respx.assert_call_count(foobar=1, hamspam=0):
        httpx.get("https://example.com/foobar")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant