diff --git a/tests/components/recorder/test_purge.py b/tests/components/recorder/test_purge.py index eedbd2c0e29..4faa8dc7e8a 100644 --- a/tests/components/recorder/test_purge.py +++ b/tests/components/recorder/test_purge.py @@ -74,16 +74,16 @@ async def test_purge_big_database( instance = await async_setup_recorder_instance(hass) - for _ in range(25): + for _ in range(12): await _add_test_states(hass, wait_recording_done=False) await async_wait_recording_done(hass) - with patch.object(instance, "max_bind_vars", 100), patch.object( - instance.database_engine, "max_bind_vars", 100 + with patch.object(instance, "max_bind_vars", 72), patch.object( + instance.database_engine, "max_bind_vars", 72 ), session_scope(hass=hass) as session: states = session.query(States) state_attributes = session.query(StateAttributes) - assert states.count() == 150 + assert states.count() == 72 assert state_attributes.count() == 3 purge_before = dt_util.utcnow() - timedelta(days=4) @@ -96,7 +96,7 @@ async def test_purge_big_database( repack=False, ) assert not finished - assert states.count() == 50 + assert states.count() == 24 assert state_attributes.count() == 1