Colin-b / pytest_httpx

pytest fixture to mock HTTPX
https://colin-b.github.io/pytest_httpx/
MIT License
344 stars 32 forks source link

support query param matcher #140

Open DeoLeung opened 6 months ago

DeoLeung commented 6 months ago

currently query parameters need to be written into the url

httpx_mock.add_response(
      method='POST',
      url='https://a.com/b?c=d&e=f',
      ...
  )

it will be easier to write and parametrize if params is supported

httpx_mock.add_response(
      method='POST',
      url='https://a.com/b',
      match_params={'c': 'd', 'e': 'f'}
      ...
  )

even support using list if repeated params are used :)