test(tradein): #3036 live-тест — обязательные url/source_url/dedup_hash в фикстурах houses/listings (NOT NULL без дефолта на проде; локально тест пропускался)
All checks were successful
CI Trade-In / changes (pull_request) Successful in 8s
CI / changes (pull_request) Successful in 10s
CI Trade-In / browser-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Successful in 4m24s
All checks were successful
CI Trade-In / changes (pull_request) Successful in 8s
CI / changes (pull_request) Successful in 10s
CI Trade-In / browser-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Successful in 4m24s
This commit is contained in:
parent
9246033795
commit
2f28f0166e
1 changed files with 9 additions and 5 deletions
|
|
@ -156,16 +156,20 @@ def test_live_fill_only_then_keep_then_unlinked_untouched() -> None:
|
|||
db.execute(text("DELETE FROM houses WHERE source='test' AND ext_house_id LIKE 't3036-%'"))
|
||||
hid = db.execute(
|
||||
text(
|
||||
"INSERT INTO houses (source, ext_house_id, address) "
|
||||
"VALUES ('test', 't3036-h1', 'ул. Тестовая, 1') RETURNING id"
|
||||
"INSERT INTO houses (source, ext_house_id, url, address) "
|
||||
"VALUES ('test', 't3036-h1', 'https://example.test/houses/t3036-h1', "
|
||||
"'ул. Тестовая, 1') RETURNING id"
|
||||
)
|
||||
).scalar_one()
|
||||
db.execute(
|
||||
text(
|
||||
"INSERT INTO listings "
|
||||
"(source, source_id, address, price_rub, house_id_fk, is_active) "
|
||||
"VALUES ('avito', 't3036-1', 'ул. Тестовая, 1', 5000000, :hid, true), "
|
||||
" ('avito', 't3036-2', 'ул. Тестовая, 2', 5000000, NULL, true)"
|
||||
"(source, source_id, source_url, dedup_hash, address, price_rub, "
|
||||
" house_id_fk, is_active) "
|
||||
"VALUES ('avito', 't3036-1', 'https://www.avito.ru/x/t3036-1', 't3036-dh-1', "
|
||||
" 'ул. Тестовая, 1', 5000000, :hid, true), "
|
||||
" ('avito', 't3036-2', 'https://www.avito.ru/x/t3036-2', 't3036-dh-2', "
|
||||
" 'ул. Тестовая, 2', 5000000, NULL, true)"
|
||||
),
|
||||
{"hid": hid},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue