From 91b04a1851f87c650a69a507b5e094026a77223a Mon Sep 17 00:00:00 2001 From: bot-backend Date: Fri, 19 Jun 2026 18:06:28 +0300 Subject: [PATCH] test(tradein): patch _geoportal_house_match in cadastral-before-yandex test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1786 merged before the test fix landed → main red on test_geocode_uses_cadastral_before_yandex. The new geoportal house-match tier runs first in geocode(); this legacy cadastral test must mock it to None so it exercises the cadastral forward path (else the MagicMock db row leaks through the new tier as lat=1.0). --- tradein-mvp/backend/tests/services/test_cadastral_reverse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tradein-mvp/backend/tests/services/test_cadastral_reverse.py b/tradein-mvp/backend/tests/services/test_cadastral_reverse.py index 2a84e233..2204774a 100644 --- a/tradein-mvp/backend/tests/services/test_cadastral_reverse.py +++ b/tradein-mvp/backend/tests/services/test_cadastral_reverse.py @@ -353,6 +353,8 @@ async def test_geocode_uses_cadastral_before_yandex() -> None: with ( patch("app.services.geocoder._cache_get", return_value=None), + # geoportal house-match (new primary local tier) misses → cadastral path exercised + patch("app.services.geocoder._geoportal_house_match", return_value=None), # anchored house-match (new primary cadastral step) misses → legacy forward used patch("app.services.geocoder._cadastral_house_match", return_value=None), patch( -- 2.45.3