diff --git a/procrastinate/contrib/django/procrastinate_app.py b/procrastinate/contrib/django/procrastinate_app.py index 17108bdf4..952c16fd6 100644 --- a/procrastinate/contrib/django/procrastinate_app.py +++ b/procrastinate/contrib/django/procrastinate_app.py @@ -50,7 +50,7 @@ class FutureApp(blueprints.Blueprint): ] ) for method in _shadowed_methods: - locals()[method] = functools.partial(_not_ready, method) + locals()[method] = staticmethod(functools.partial(_not_ready, method)) class ProxyApp: diff --git a/pyproject.toml b/pyproject.toml index 567bf8471..2b27b1c9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,6 +125,7 @@ filterwarnings = """ ignore:unclosed.+:ResourceWarning """ asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" DJANGO_SETTINGS_MODULE = "tests.acceptance.django_settings"