From 33a8c0704396db40794d220e2ef30e1bf550c9f3 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 11 Aug 2026 01:34:06 +0000 Subject: [PATCH] Make tests follow the earlier change of merging version and msgspec migration records into one. --- tests/test_kanta_integration.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_kanta_integration.py b/tests/test_kanta_integration.py index a1140c5..a59a13b 100644 --- a/tests/test_kanta_integration.py +++ b/tests/test_kanta_integration.py @@ -562,13 +562,12 @@ async def test_migration_with_changes_records_diff_and_snapshot( records = read_changes(path, format_config) migration_records = [r for r in records if r.a.startswith("migrate")] - assert len(migration_records) == 2 + # The version migration and the msgspec normalization that follows it are + # grouped into a single migrate:vN record. + assert len(migration_records) == 1 assert migration_records[0].a == "migrate:v1" assert migration_records[0].v == 1 - assert migration_records[0].diff == {"counter": 2} - assert migration_records[1].a == "migrate:msgspec" - assert migration_records[1].v == 1 - assert migration_records[1].diff == {"users": {}} + assert migration_records[0].diff == {"counter": 2, "users": {}} snap = read_last_snapshot(path, format_config) assert snap is not None