From 3f5f57877a45be7b50d16707a56a7fe014c857f7 Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov Date: Sun, 27 Sep 2026 16:25:02 +0300 Subject: [PATCH] =?UTF-8?q?test:=20HTTP-=D1=82=D0=B5=D1=81=D1=82=D1=8B=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=B1=D0=BE=D1=80=D0=B0=20=D0=BE=D1=82=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=BA=20=D0=BD=D0=B5=20=D1=82=D1=80=D0=B5?= =?UTF-8?q?=D0=B1=D1=83=D1=8E=D1=82=20PostgreSQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/tests/test_finding_review.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/tests/test_finding_review.py b/backend/tests/test_finding_review.py index 50cb83f..227d74d 100644 --- a/backend/tests/test_finding_review.py +++ b/backend/tests/test_finding_review.py @@ -160,7 +160,16 @@ def lesson(monkeypatch): async def no_coach(_metrics): return NoCoaching() + async def audit_in_memory(*_args, **_kwargs): + return None + + async def no_database(): + yield None + + # Живое занятие в памяти: чтение отчёта не должно ходить в PostgreSQL. monkeypatch.setattr(finish_module, "coach", no_coach) + monkeypatch.setattr(sessions, "audit_required", audit_in_memory) + monkeypatch.setitem(app.dependency_overrides, sessions.optional_session, no_database) store = MemorySessionStore() monkeypatch.setattr(hub, "store", store) state = dds_exercise_early_finish()