diff options
| author | YashRaj1506 <yashraj504300@gmail.com> | 2024-12-07 17:19:46 +0530 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-03 08:41:34 +0100 |
| commit | 083e6239538cbc34ae9781c2e70a8a8dbfcf2817 (patch) | |
| tree | ae250e50eb96e198f85b11e42c9413f8078bb8ca /django | |
| parent | 12f4f95405c7857cbf2f4bf4d0261154aac31676 (diff) | |
Fixed #35414 -- Used default headers in AsyncRequestFactory.
Diffstat (limited to 'django')
| -rw-r--r-- | django/test/client.py | 2 |
1 files changed, 2 insertions, 0 deletions
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( [ |
