diff --git a/tests/integration_tests/test_all_cache_types.py b/tests/integration_tests/test_all_cache_types.py index d5bc525a..724abb7e 100644 --- a/tests/integration_tests/test_all_cache_types.py +++ b/tests/integration_tests/test_all_cache_types.py @@ -105,11 +105,18 @@ def test_replace_strategy( new_generic_cache: ab.caches.CacheBase, mocker: pytest.MockerFixture, ) -> None: - """Test that the append strategy works as expected.""" + """Test that the replace strategy works as expected. + + We expect old data to be fully replaced with newer data. For this test, + we run the 'seed b' test (expected 300 records) before the 'seed a' test + (expected 200 records). We assert the correct count of records at each step, + first 300 and then 200 records. + """ mocker.spy(new_generic_cache.processor, '_swap_temp_table_with_final_table') mocker.spy(new_generic_cache.processor, '_merge_temp_table_to_final_table') - assert FAKER_SCALE_B > FAKER_SCALE_A + assert FAKER_SCALE_B > FAKER_SCALE_A, \ + "The test requires that 'b' has a greater count of records than 'a'." result = source_faker_seed_b.read( new_generic_cache,