fix: preserve complete source snapshots and exports

This commit is contained in:
Aleksandr Meshchryakov
2026-10-05 17:49:22 +02:00
parent 3ce9898c0e
commit b1710408fd
7 changed files with 110 additions and 1 deletions

View File

@@ -165,6 +165,21 @@ def test_repeated_page_content_with_advanced_number_rejected():
collect(client_with(first, second))
@pytest.mark.parametrize("source", ["checko_messages", "checko_leasing"])
def test_overlapping_pages_cannot_prove_total_before_leasing_filter(source):
from copy import deepcopy
first, second = fixture("messages-page-1.json"), fixture("messages-page-2.json")
shared = deepcopy(first["data"]["Записи"][0])
first["data"]["Записи"].append(dict(shared, GUID="other-first"))
second["data"]["Записи"].insert(0, shared)
for response in (first, second):
response["data"]["ЗапВсего"] = 4
with pytest.raises(SnapshotValidationError) as error:
collect(client_with(first, second), source)
assert str(error.value.__cause__) == "incomplete_checko_record_count"
def test_license_unknown_raw_fields_survive():
response = fixture("license.json")
response["data"]["Лиценз"][0]["FutureField"] = {"nested": [None, 0, False]}