mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #32172 -- Used asgiref coroutine shim in async signals tests.
Bug in e83a88566a
.
This commit is contained in:
parent
279e611c01
commit
9b22457987
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user