Skip to content

Commit a40a7ed

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 680a448 commit a40a7ed

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

CHANGES/1458.bugfix.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Fixed ``uuid.UUID`` objects being converted to integers instead of strings
2-
when used as query parameter values -- by :user:`toroleapinc`.
1+
Fixed ``uuid.UUID`` objects being converted to integers instead of strings
2+
when used as query parameter values -- by :user:`toroleapinc`.

tests/test_update_query.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ def test_with_query_uuid() -> None:
281281
url = URL("http://example.com/path")
282282
test_uuid = uuid.UUID("3199712f-1b78-4420-852b-a73ee09e6a8f")
283283
url2 = url.with_query(user_id=test_uuid)
284-
assert str(url2) == "http://example.com/path?user_id=3199712f-1b78-4420-852b-a73ee09e6a8f"
284+
assert (
285+
str(url2)
286+
== "http://example.com/path?user_id=3199712f-1b78-4420-852b-a73ee09e6a8f"
287+
)
285288

286289

287290
def test_with_query_uuid_multiple_values() -> None:
@@ -290,7 +293,10 @@ def test_with_query_uuid_multiple_values() -> None:
290293
uuid1 = uuid.UUID("3199712f-1b78-4420-852b-a73ee09e6a8f")
291294
uuid2 = uuid.UUID("550e8400-e29b-41d4-a716-446655440000")
292295
url2 = url.with_query([("id", uuid1), ("id", uuid2)])
293-
assert str(url2) == "http://example.com/path?id=3199712f-1b78-4420-852b-a73ee09e6a8f&id=550e8400-e29b-41d4-a716-446655440000"
296+
assert (
297+
str(url2)
298+
== "http://example.com/path?id=3199712f-1b78-4420-852b-a73ee09e6a8f&id=550e8400-e29b-41d4-a716-446655440000"
299+
)
294300

295301

296302
def test_with_query_uuid_mixed_types() -> None:
@@ -310,7 +316,10 @@ def test_update_query_uuid() -> None:
310316
url = URL("http://example.com/path?existing=value")
311317
test_uuid = uuid.UUID("3199712f-1b78-4420-852b-a73ee09e6a8f")
312318
url2 = url.update_query(user_id=test_uuid)
313-
assert str(url2) == "http://example.com/path?existing=value&user_id=3199712f-1b78-4420-852b-a73ee09e6a8f"
319+
assert (
320+
str(url2)
321+
== "http://example.com/path?existing=value&user_id=3199712f-1b78-4420-852b-a73ee09e6a8f"
322+
)
314323

315324

316325
def test_with_query_multidict() -> None:

0 commit comments

Comments
 (0)