summaryrefslogtreecommitdiff
path: root/tests/asgi/urls.py
diff options
context:
space:
mode:
authorSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-06-18 08:55:15 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-06-18 11:25:14 +0200
commit1cd91d5d4bfb65ea7b5c7177310f849d05037609 (patch)
tree388b8080198f341ad1744c4ce31e57ad048599e9 /tests/asgi/urls.py
parent1520870c4a6c47df3ed2f597785a8d35a1710bc4 (diff)
Refs #36467 -- Added test for Set-Cookie header values in ASGIHandler.
Diffstat (limited to 'tests/asgi/urls.py')
-rw-r--r--tests/asgi/urls.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/asgi/urls.py b/tests/asgi/urls.py
index 931b7d5206..0311cf3f76 100644
--- a/tests/asgi/urls.py
+++ b/tests/asgi/urls.py
@@ -25,6 +25,12 @@ def hello_meta(request):
)
+def hello_cookie(request):
+ response = HttpResponse("Hello World!")
+ response.set_cookie("key", "value")
+ return response
+
+
def sync_waiter(request):
with sync_waiter.lock:
sync_waiter.active_threads.add(threading.current_thread())
@@ -61,6 +67,7 @@ test_filename = __file__
urlpatterns = [
path("", hello),
+ path("cookie/", hello_cookie),
path("file/", lambda x: FileResponse(open(test_filename, "rb"))),
path("meta/", hello_meta),
path("post/", post_echo),