Skip to content

Commit 56f59ec

Browse files
authored
python: Add test for url encoding of # (#1763)
2 parents 3adf8b4 + 63faebd commit 56f59ec

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

python/requirements-dev.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.13
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# pip-compile --output-file=requirements-dev.txt requirements.in/development.txt
@@ -23,6 +23,8 @@ h11==0.14.0
2323
# via httpcore
2424
httpcore==0.17.3
2525
# via httpx
26+
httpretty==1.1.4
27+
# via -r requirements.in/development.txt
2628
httpx==0.24.1
2729
# via -r requirements.in/development.txt
2830
idna==3.10

python/requirements.in/development.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ pytest-docker
88
pytest-httpserver
99
requests
1010
types-requests
11+
httpretty

python/tests/test_httpretty.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import svix
2+
from svix.api import MessageListOptions
3+
import httpretty
4+
5+
@httpretty.activate(verbose=True, allow_net_connect=False)
6+
def test_octothorpe_in_query_param():
7+
svx = svix.Svix("token",svix.SvixOptions(server_url="http://test.example"))
8+
httpretty.register_uri(
9+
httpretty.GET,
10+
"http://test.example/api/v1/app/app_id/msg?tag=test%23test",
11+
body='{"data":[],"iterator":null,"prevIterator":null,"done":true}'
12+
)
13+
svx.message.list("app_id",MessageListOptions(tag="test#test"))

0 commit comments

Comments
 (0)