Compare commits

..

No commits in common. "aab07845f6b9de52e9960eb34e1bcba4f57f9c66" and "7d39aebbd43ef8fb5a960a8edacfe3b89d8798d0" have entirely different histories.

3 changed files with 1 additions and 14 deletions

View file

@ -258,18 +258,9 @@ async def test_cian_price_history_saves_changes():
patch("app.services.cian_price_history.save_detail_enrichment") as mock_save,
patch("app.services.cian_price_history.get_scraper_delay", return_value=0.0),
):
# Call 1: SELECT listings → .mappings().all()
mock_listings_result = MagicMock()
mock_mappings = MagicMock()
mock_mappings.all.return_value = rows
mock_listings_result.mappings.return_value = mock_mappings
# Call 2: SELECT COUNT(*) before save → scalar_one() == 0
mock_before_result = MagicMock()
mock_before_result.scalar_one.return_value = 0
# Call 3: SELECT COUNT(*) after save → scalar_one() == 2 (2 rows inserted)
mock_after_result = MagicMock()
mock_after_result.scalar_one.return_value = 2
mock_db.execute.side_effect = [mock_listings_result, mock_before_result, mock_after_result]
mock_db.execute.return_value.mappings.return_value = mock_mappings
result = await backfill_cian_price_history(mock_db, batch_size=10)

View file

@ -151,7 +151,6 @@ def test_match_house_tier0_cadastr():
[
None, # pg_advisory_xact_lock
{"id": 42}, # cadastral match
None, # _insert_alias (added by #1543: register fp/addr alias after cadastr_exact)
None, # _upsert_house_source (INSERT ... ON CONFLICT)
]
)

View file

@ -312,9 +312,6 @@ class _ExecuteCapture:
def commit(self) -> None:
pass
def rollback(self) -> None:
pass
@pytest.mark.asyncio
async def test_pull_sber_indices_upsert_on_conflict_idempotent() -> None: