summaryrefslogtreecommitdiff
path: root/tests/decorators
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2026-01-30 15:53:27 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2026-01-31 08:59:54 -0500
commit4a52533329a03207c1c4592a13fbb12b9ec5ef9e (patch)
treed45724230dc3a299b1563418e2713cfc81450604 /tests/decorators
parent93dfb16e96797583a6f45eeb918e78c7f2817318 (diff)
Refs #34118 -- Removed asgiref coroutine detection shims.
As Python 3.12 is now the floor, we can drop the shims and use the `inspect` module.
Diffstat (limited to 'tests/decorators')
-rw-r--r--tests/decorators/test_cache.py3
-rw-r--r--tests/decorators/test_clickjacking.py2
-rw-r--r--tests/decorators/test_common.py2
-rw-r--r--tests/decorators/test_csp.py3
-rw-r--r--tests/decorators/test_csrf.py2
-rw-r--r--tests/decorators/test_gzip.py2
-rw-r--r--tests/decorators/test_http.py3
-rw-r--r--tests/decorators/test_vary.py2
-rw-r--r--tests/decorators/tests.py3
9 files changed, 9 insertions, 13 deletions
diff --git a/tests/decorators/test_cache.py b/tests/decorators/test_cache.py
index 513ff7e711..1aca6967e0 100644
--- a/tests/decorators/test_cache.py
+++ b/tests/decorators/test_cache.py
@@ -1,7 +1,6 @@
+from inspect import iscoroutinefunction
from unittest import mock
-from asgiref.sync import iscoroutinefunction
-
from django.http import HttpRequest, HttpResponse
from django.test import SimpleTestCase
from django.utils.decorators import method_decorator
diff --git a/tests/decorators/test_clickjacking.py b/tests/decorators/test_clickjacking.py
index fe4c551648..b585b00451 100644
--- a/tests/decorators/test_clickjacking.py
+++ b/tests/decorators/test_clickjacking.py
@@ -1,4 +1,4 @@
-from asgiref.sync import iscoroutinefunction
+from inspect import iscoroutinefunction
from django.http import HttpRequest, HttpResponse
from django.middleware.clickjacking import XFrameOptionsMiddleware
diff --git a/tests/decorators/test_common.py b/tests/decorators/test_common.py
index a2661ef30a..53ec5c07bc 100644
--- a/tests/decorators/test_common.py
+++ b/tests/decorators/test_common.py
@@ -1,4 +1,4 @@
-from asgiref.sync import iscoroutinefunction
+from inspect import iscoroutinefunction
from django.http import HttpRequest, HttpResponse
from django.test import SimpleTestCase
diff --git a/tests/decorators/test_csp.py b/tests/decorators/test_csp.py
index 2def6b0f79..46e573cfa1 100644
--- a/tests/decorators/test_csp.py
+++ b/tests/decorators/test_csp.py
@@ -1,7 +1,6 @@
+from inspect import iscoroutinefunction
from itertools import product
-from asgiref.sync import iscoroutinefunction
-
from django.http import HttpRequest, HttpResponse
from django.test import SimpleTestCase
from django.utils.csp import CSP
diff --git a/tests/decorators/test_csrf.py b/tests/decorators/test_csrf.py
index c193444864..eb01339cf9 100644
--- a/tests/decorators/test_csrf.py
+++ b/tests/decorators/test_csrf.py
@@ -1,4 +1,4 @@
-from asgiref.sync import iscoroutinefunction
+from inspect import iscoroutinefunction
from django.conf import settings
from django.http import HttpRequest, HttpResponse
diff --git a/tests/decorators/test_gzip.py b/tests/decorators/test_gzip.py
index 87eff0fe77..2d64c171f7 100644
--- a/tests/decorators/test_gzip.py
+++ b/tests/decorators/test_gzip.py
@@ -1,4 +1,4 @@
-from asgiref.sync import iscoroutinefunction
+from inspect import iscoroutinefunction
from django.http import HttpRequest, HttpResponse
from django.test import SimpleTestCase
diff --git a/tests/decorators/test_http.py b/tests/decorators/test_http.py
index 4b1b81588e..b0bb4c1e00 100644
--- a/tests/decorators/test_http.py
+++ b/tests/decorators/test_http.py
@@ -1,6 +1,5 @@
import datetime
-
-from asgiref.sync import iscoroutinefunction
+from inspect import iscoroutinefunction
from django.http import HttpRequest, HttpResponse, HttpResponseNotAllowed
from django.test import SimpleTestCase
diff --git a/tests/decorators/test_vary.py b/tests/decorators/test_vary.py
index ccab18a660..cf5f36b97d 100644
--- a/tests/decorators/test_vary.py
+++ b/tests/decorators/test_vary.py
@@ -1,4 +1,4 @@
-from asgiref.sync import iscoroutinefunction
+from inspect import iscoroutinefunction
from django.http import HttpRequest, HttpResponse
from django.test import SimpleTestCase
diff --git a/tests/decorators/tests.py b/tests/decorators/tests.py
index fce64a8834..0c5213f0ab 100644
--- a/tests/decorators/tests.py
+++ b/tests/decorators/tests.py
@@ -1,9 +1,8 @@
import asyncio
from functools import update_wrapper, wraps
+from inspect import iscoroutinefunction
from unittest import TestCase
-from asgiref.sync import iscoroutinefunction
-
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import (
login_required,