From 083e6239538cbc34ae9781c2e70a8a8dbfcf2817 Mon Sep 17 00:00:00 2001 From: YashRaj1506 Date: Sat, 7 Dec 2024 17:19:46 +0530 Subject: Fixed #35414 -- Used default headers in AsyncRequestFactory. --- django/test/client.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'django') diff --git a/django/test/client.py b/django/test/client.py index 85d91b0c44..c733372130 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -752,6 +752,8 @@ class AsyncRequestFactory(RequestFactory): "scheme": "https" if secure else "http", "headers": [(b"host", b"testserver")], } + if self.defaults: + extra = {**self.defaults, **extra} if data: s["headers"].extend( [ -- cgit v1.3