I run Live Tennis API.
Recorded query parameters are decoded twice. A value such as one%26two becomes two fields instead of the value one&two.
This fails against the current main branch:
import requests
from mocket import Mocket, Mocketizer
from mocket.mocks.mockhttp import Entry
url = "http://testme.org/?q=one%26two"
with Mocketizer(strict_mode=True):
Entry.single_register(Entry.GET, url, body="ok")
with requests.get(url, timeout=5) as response:
assert response.content == b"ok"
assert Mocket.last_request().querystring == {"q": ["one&two"]}
The actual result is {"q": ["one"], "two": [""]}. Escaped plus signs and percent signs are also decoded twice.
PR #330 fixes this and adds regression tests. I opened this issue at the maintainer's request on that PR.
I run Live Tennis API.
Recorded query parameters are decoded twice. A value such as
one%26twobecomes two fields instead of the valueone&two.This fails against the current main branch:
The actual result is
{"q": ["one"], "two": [""]}. Escaped plus signs and percent signs are also decoded twice.PR #330 fixes this and adds regression tests. I opened this issue at the maintainer's request on that PR.