pytest-mock-server icon indicating copy to clipboard operation
pytest-mock-server copied to clipboard

404 on URL with parameters

Open jas02 opened this issue 1 year ago • 0 comments

In case I am mocking/testing URL with some parameter, server always response with 404:

@pytest.mark.server(url='/api/v2/products/?limit=2, response={}, method=‘GET’)
def test_url(monkeypatch) -> None:
    ….

I am using monkeypatch to mock environmental variables. Hope it doesn’t interfere with pytest-mock-server.

Is there a way howto passURL parameter to the Flask route?

Thanks for your help.

Lumir

jas02 avatar Aug 25 '23 18:08 jas02