gendesign/tradein-mvp/backend/tests
bot-backend 42de30cd5c refactor(tradein): unify kadastr_num -> cadastral_number (#732)
p3 naming-consistency (cadastral cols 0% filled). Migration 094_cadastral_unify.sql
(idempotent DO-block IF EXISTS): drop+recreate listings_search_mv (MV) +
v_data_quality (view), RENAME deals/house_metadata kadastr_num->cadastral_number,
DROP listings.kadastr_num + listings_kadastr_idx. Code SQL-string renames in
search_query/estimator/base (Lot dataclass field NOT renamed). 240 tests pass.

WARN: destructive DDL auto-applies to prod on deploy -> MERGE-GATE post-demo.
Reviewer: verify recreated MV/view DDL vs LIVE pg_get_viewdef before apply
(reconstructed from migration history 050/046, not live capture).

Refs #732
2026-05-31 15:41:52 +03:00
..
fixtures fix(scrapers): avito per-card parse_failures counter + logging (Refs #823) (#830) 2026-05-30 20:01:50 +00:00
matching chore(tradein): close pre-commit ruff gap + add CI pytest gate (#666) (#675) 2026-05-29 19:18:48 +00:00
scrapers fix(tradein): sweep shared-session (SERP+detail) через mobile proxy (#623) (#805) 2026-05-30 18:07:37 +00:00
scripts feat(tradein): приоритизировать DaData house-backfill на дома с листингами (accuracy #2) 2026-05-28 15:17:01 +05:00
services feat(tradein): expected-sold price in estimate PDF (#648 S5b — final) (#665) 2026-05-29 14:09:46 +00:00
tasks fix(tradein): yandex address-enrich — city-agnostic title regex (спутники ЕКБ) (#875) 2026-05-31 09:08:29 +00:00
__init__.py feat(tradein): avito_imv.py — Avito IMV evaluation API client (2 requests) (#444) 2026-05-23 12:16:47 +00:00
test_849_matching_savepoint.py fix(matching): Tier 2b alias sync + collapse double SAVEPOINT (#849) (#870) 2026-05-31 08:05:48 +00:00
test_account_quota.py fix(tradein): atomic conditional quota increment — close TOCTOU (#747) (#749) 2026-05-30 15:52:34 +00:00
test_admin_ssrf.py fix(tradein): SSRF host-allowlist на admin scrape + удалён dead ADMIN_TOKEN (Refs #756) (#778) 2026-05-30 16:27:19 +00:00
test_anchor_watchdog.py feat(tradein): per-anchor watchdog timeout in city sweeps (#880) (#881) 2026-05-31 10:40:41 +00:00
test_api_avito_stage4a.py fix(tradein): single-run guard на avito-city-sweep admin-endpoint (#874) 2026-05-31 08:55:33 +00:00
test_asking_to_sold_ratio.py fix(ratio): ppm² потолок asking→sold в конфиг, default 1.2M (Refs #767) (#790) 2026-05-30 16:57:09 +00:00
test_audit_address_mismatch.py feat(tradein): Phase 1 of #582 — address mismatch audit infrastructure 2026-05-25 12:50:30 +05:00
test_avito_address_clean.py fix(tradein-avito): strip Emotion CSS from listings.address (#502) 2026-05-24 10:52:50 +00:00
test_avito_blockpage.py fix(scrapers): avito per-card parse_failures counter + logging (Refs #823) (#830) 2026-05-30 20:01:50 +00:00
test_avito_citywide.py feat(tradein): avito citywide + byrooms sweep mode (T6) (#848) 2026-05-31 06:13:19 +00:00
test_avito_detail_parse.py fix(tradein): avito house-link из detail SSR — SERP-карточка JS-only (#871) (#873) 2026-05-31 08:27:47 +00:00
test_avito_houses_parse.py fix(tradein): decode Avito houses URL-encoded __preloadedState__ (#566) 2026-05-28 15:58:19 +05:00
test_avito_imv_parse.py fix(tradein-imv): harden Avito IMV anti-bot path + offline contract tests (#565) 2026-05-28 16:29:05 +05:00
test_avito_relative_date.py fix(tradein): Avito listing_date extraction (3 формата) (#601) 2026-05-27 12:55:27 +00:00
test_avito_serp_date.py feat(tradein): Avito mobile proxy egress + firewall detect + MSK date (#623, #726) (#788) 2026-05-30 16:52:35 +00:00
test_backfill_house_coords.py feat(tradein): Phase 2-3 of #582 — Yandex backfill + canonical audit (#591) 2026-05-27 06:30:54 +00:00
test_backfill_wave2.py feat(tradein): admin backfill endpoints — cian price-history (T8a) + yandex address (T10) + house IMV (T7) (#856) 2026-05-31 06:37:10 +00:00
test_backtest_estimator.py feat(backtest): per-rooms asking→sold correction block (#648 S1) (#650) 2026-05-29 13:11:55 +00:00
test_base_save_listings.py fix(matching): Tier 2b alias sync + collapse double SAVEPOINT (#849) (#870) 2026-05-31 08:05:48 +00:00
test_cian_city_sweep.py fix(tradein): cian sweep houses-phase — JOIN house_sources + graceful (не fatal) (#868) 2026-05-31 07:59:26 +00:00
test_cian_detail.py feat(tradein): infer repair_state from listing description text (#622) (#632) 2026-05-28 15:37:34 +00:00
test_cian_newbuilding.py feat(tradein): cian_newbuilding.py — ЖК catalog scraper (chart + reliability + offers, Wave 4 Worker C) (#459) 2026-05-23 13:23:11 +00:00
test_cian_serp_scraper.py fix(scrapers): normalize cian descriptionMinhash list[int]→str + silent-0 guard (Refs #836) (#840) 2026-05-30 20:28:56 +00:00
test_cian_session.py fix(cian): verify_session на curl_cffi impersonate — ban != cookies expired (Refs #768) (#785) 2026-05-30 16:40:54 +00:00
test_cian_state_parser.py fix(tradein): cian _cianConfig concat-формат + auth из header-frontend (#639) (#819) 2026-05-30 19:08:01 +00:00
test_cian_valuation.py feat(tradein): cian_valuation.py — auth-required Calculator scraper + 24h cache (#465) 2026-05-23 13:43:34 +00:00
test_city_sweep.py test(tradein): fix sweep-endpoint тесты после single-run guard (#874 follow-up) (#876) 2026-05-31 09:07:41 +00:00
test_deactivate_stale_avito.py feat(tradein): nightly task to deactivate stale avito listings (#759) (#862) 2026-05-31 07:19:37 +00:00
test_deals_sanitize.py fix(tradein): sanitize ДКП deal outliers (floor / ppm²) (#699) (#733) 2026-05-30 14:31:44 +00:00
test_estimate_idor.py fix(tradein): rehydrate POST-only fields on GET /estimate/{id} (#696) (#710) 2026-05-30 11:05:52 +00:00
test_estimator_cian_integration.py feat(tradein): estimator additive expected_sold price (#648 S3) (#661) 2026-05-29 13:37:33 +00:00
test_estimator_cohort.py fix(tradein-estimator): extend cohort filter to Tier S + Tier H, fix late_soviet overlap (#522) 2026-05-24 13:14:59 +00:00
test_estimator_enrich.py refactor(tradein): unify kadastr_num -> cadastral_number (#732) 2026-05-31 15:41:52 +03:00
test_estimator_expected_sold.py feat(tradein): same-building anchor safe-guard (#755) 2026-05-31 12:19:50 +03:00
test_estimator_floor_optional.py feat(tradein): этаж/этажность optional + best test presets по deal count (#558) 2026-05-24 21:44:44 +00:00
test_estimator_imv_blend.py feat(tradein): blend Avito IMV anchor into estimate + ДКП corridor advisory (#651, #652) (#674) 2026-05-29 17:42:06 +00:00
test_estimator_imv_integration.py feat(tradein): integrate Avito IMV as 5th evaluation source (on-demand cached) (#452) 2026-05-23 13:08:22 +00:00
test_estimator_null_floor_timeout.py fix(tradein): time-budget estimate enrichment + observable errors to stop opaque 502 (#654) (#673) 2026-05-29 17:22:02 +00:00
test_estimator_pure_units.py test(tradein): estimator pure-helper unit tests + fix None crash in _filter_outliers (#580) (#640) 2026-05-29 08:24:18 +00:00
test_estimator_quarter_index.py fix(estimator): sanity-clamp quarter-index factor (#859) (#863) 2026-05-31 07:20:59 +00:00
test_estimator_repair_coef.py feat(tradein): estimator additive expected_sold price (#648 S3) (#661) 2026-05-29 13:37:33 +00:00
test_estimator_source_quota.py feat(tradein): estimator additive expected_sold price (#648 S3) (#661) 2026-05-29 13:37:33 +00:00
test_estimator_yandex_integration.py test(tradein): align yandex history tests с batch-executemany (unblock deploy) (#851) 2026-05-31 06:16:45 +00:00
test_extract_short_addr.py feat(tradein-estimator): tiered house-match S→H→W (#507) 2026-05-24 12:41:12 +00:00
test_geo_precision.py feat(estimator): exclude city-centroid listings from radius analogs (Refs #769 Part E) 2026-05-30 21:22:21 +03:00
test_geocode_reverse_api.py feat(tradein): MapPicker snap marker — Phase 5 of #582 (#594) 2026-05-27 09:30:17 +00:00
test_history_scope.py chore(tradein): close pre-commit ruff gap + add CI pytest gate (#666) (#675) 2026-05-29 19:18:48 +00:00
test_insufficient_data_flag.py feat(tradein): insufficient_data flag on AggregatedEstimate (#697) (#734) 2026-05-30 14:40:04 +00:00
test_listing_source_snapshot.py feat(tradein): per-source listing price history — schema + daily snapshot (#570) (#646) 2026-05-29 12:18:04 +00:00
test_matching.py fix(matching): Tier 2b alias sync + collapse double SAVEPOINT (#849) (#870) 2026-05-31 08:05:48 +00:00
test_me_brand.py feat(tradein): brand-by-account + result IA redesign (distinct asking/sale prices) (#683) 2026-05-30 06:45:14 +00:00
test_n1_city_sweep.py feat(scrapers): wire N1.ru city sweep — pipeline + scheduler + admin endpoint (#575) (#745) 2026-05-30 15:43:38 +00:00
test_n1_floor_parse.py feat(scrapers/n1): извлекать floor/total_floors из ведущего N/M-токена (Refs #795) (#802) 2026-05-30 17:31:13 +00:00
test_pdf_security.py fix(pdf): brand-spoof + median=0 empty-state + SSRF + дисклеймер + sources (Refs #772) (#789) 2026-05-30 16:55:56 +00:00
test_ratelimit.py fix(tradein): bypass rate-limit for authenticated pilots + configurable limit (#655) (#669) 2026-05-29 15:56:30 +00:00
test_rbac.py feat(rbac): pilot scope → только /trade-in/** (#587) 2026-05-26 07:40:44 +00:00
test_repair_state_normalizer.py feat(tradein): infer repair_state from listing description text (#622) (#632) 2026-05-28 15:37:34 +00:00
test_rosreestr_dedup_key.py fix(tradein): plain natural-key dedup_hash for rosreestr deals (#576) (#638) 2026-05-29 06:56:35 +00:00
test_sales_vs_listings.py feat(tradein): sales-vs-listings endpoint (PR K, foundation #564) (#597) 2026-05-27 11:55:44 +00:00
test_same_building_anchor.py feat(tradein): same-building anchor safe-guard (#755) 2026-05-31 12:19:50 +03:00
test_same_building_match.py feat(tradein): same-building матчинг аналогов по house_id (#6) 2026-05-28 13:55:51 +05:00
test_scheduler.py fix(scheduler): atomic _claim_run via advisory xact lock (Refs #750) (#752) 2026-05-30 16:04:33 +00:00
test_scrape_pipeline.py feat(tradein): scrape_pipeline.py — Avito full orchestrator (search → houses → detail) (#451) 2026-05-23 12:55:13 +00:00
test_scrape_run_alert.py feat(observability): sentry alert on N consecutive scraper failures (Refs #827) (#833) 2026-05-30 20:10:29 +00:00
test_scraper_proxy.py fix(tradein): route yandex/valuation/imv/newbuilding scrapers через scraper_proxy_url (#860) 2026-05-31 07:04:31 +00:00
test_scraper_settings.py feat(tradein): global scraper delay setting (applies across all scrapers) (#485) 2026-05-23 15:43:28 +00:00
test_search_api.py refactor(tradein): unify kadastr_num -> cadastral_number (#732) 2026-05-31 15:41:52 +03:00
test_sentry_scrub.py feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00
test_snapshot_writer.py fix(tradein): implement listings_snapshots + offer_price_history writers (#567) (#624) 2026-05-28 13:49:52 +00:00
test_street_deals_endpoint.py fix(tradein): word-boundary street match + cian unescape robustness (Refs #769 A1+D) (#798) 2026-05-30 17:18:33 +00:00
test_sweep_imv_phase.py test(tradein): fix sweep-endpoint тесты после single-run guard (#874 follow-up) (#876) 2026-05-31 09:07:41 +00:00
test_yandex_city_sweep.py feat(tradein): yandex city-sweep — один прогон SERP+address-enrich (#867) 2026-05-31 07:43:13 +00:00
test_yandex_detail.py feat(tradein): yandex_detail.py — Product JSON-LD + DOM detail parser (#466) 2026-05-23 13:45:09 +00:00
test_yandex_helpers.py fix(tradein): Yandex listing_date — keyword + absolute-no-year (#602) 2026-05-27 13:11:22 +00:00
test_yandex_newbuilding.py feat(tradein): yandex_newbuilding.py — ЖК landing parser (149 selectors + NLP) (#467) 2026-05-23 13:46:45 +00:00
test_yandex_realty_serp.py feat(tradein): yandex SERP curl_cffi+cookies transport + rooms×price combos (T4+T5) (#847) 2026-05-31 06:11:30 +00:00
test_yandex_scrapers_delay_wiring.py feat(tradein): scraper_settings live-config + Yandex admin trigger endpoints (#484) 2026-05-23 15:28:34 +00:00
test_yandex_valuation.py fix(yandex-valuation): off-by-one cell index in _parse_row_cells (#552) 2026-05-24 19:57:17 +00:00
test_yandex_valuation_save.py perf(estimator): executemany batch insert in _save_yandex_history_items (Refs #826) (#832) 2026-05-30 20:07:06 +00:00