Open pgcd opened 2 years ago
This is the first request. Pull requests are welcome.
Okay, I have a work in progress: however it will likely change the existing decorators to use contextlib.ContextDecorator (and contextlib.AsyncContextDecorator). Is that going to be acceptable?
Actually, looking at the code, it seems it already uses a subclass of that (via django.test.utils.TestContextDecorator).
I think I'll need to do more digging to find out how to make it work.
Turned out the simplest thing to do was to wrap the test (inside the application of the waffle decorator), like show at the bottom of the section https://docs.djangoproject.com/en/5.0/topics/testing/tools/#testing-asynchronous-code
Are there plans to add async support (at least to views and middleware)? Alternatively, is there any demand for it?