From c4477b031a14ac45cf367b147b84d375a90f22de Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Mon, 10 Jun 2024 13:39:12 -0400 Subject: [PATCH] wip --- engine/apps/integrations/tests/test_views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/apps/integrations/tests/test_views.py b/engine/apps/integrations/tests/test_views.py index cdfbe889b8..cd4bc26e66 100644 --- a/engine/apps/integrations/tests/test_views.py +++ b/engine/apps/integrations/tests/test_views.py @@ -24,6 +24,14 @@ class DatabaseBlocker(DjangoDbBlocker): """Customize pytest_django db blocker to raise OperationalError exception.""" + def __init__(self, *args, **kwargs): + """ + Override the constructor to get around this: + https://github.com/pytest-dev/pytest-django/blob/v4.8.0/pytest_django/plugin.py#L778-L782 + """ + self._history = [] + self._real_ensure_connection = None + def _blocking_wrapper(*args, **kwargs): __tracebackhide__ = True __tracebackhide__ # Silence pyflakes