summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/signals/tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/signals/tests.py b/tests/signals/tests.py
index 0f161eeeb1..5558778bbe 100644
--- a/tests/signals/tests.py
+++ b/tests/signals/tests.py
@@ -1,6 +1,7 @@
-import asyncio
from unittest import mock
+from asgiref.sync import markcoroutinefunction
+
from django import dispatch
from django.apps.registry import Apps
from django.db import models
@@ -543,9 +544,11 @@ class SyncHandler:
class AsyncHandler:
- _is_coroutine = asyncio.coroutines._is_coroutine
param = 0
+ def __init__(self):
+ markcoroutinefunction(self)
+
async def __call__(self, **kwargs):
self.param += 1
return self.param