summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
Diffstat (limited to 'django/test')
-rw-r--r--django/test/client.py4
-rw-r--r--django/test/signals.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/django/test/client.py b/django/test/client.py
index cf63265faa..6e1dbb5be5 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -219,9 +219,7 @@ class AsyncClientHandler(BaseHandler):
body_file = FakePayload("")
request_started.disconnect(close_old_connections)
- await sync_to_async(request_started.send, thread_sensitive=False)(
- sender=self.__class__, scope=scope
- )
+ await request_started.asend(sender=self.__class__, scope=scope)
request_started.connect(close_old_connections)
# Wrap FakePayload body_file to allow large read() in test environment.
request = ASGIRequest(scope, LimitedStream(body_file, len(body_file)))
diff --git a/django/test/signals.py b/django/test/signals.py
index 94a5161e82..c16f4aa5ee 100644
--- a/django/test/signals.py
+++ b/django/test/signals.py
@@ -183,7 +183,7 @@ def complex_setting_changed(*, enter, setting, **kwargs):
# this stacklevel shows the line containing the override_settings call.
warnings.warn(
f"Overriding setting {setting} can lead to unexpected behavior.",
- stacklevel=6,
+ stacklevel=5,
)