Fix mariadb recorder tests for Python 3.13 (#129303)

pull/129128/head^2
Marc Mueller 2024-10-29 09:17:47 +01:00 committed by GitHub
parent 1171106afb
commit 2de161ce0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -853,6 +853,7 @@ async def test_migrate_event_type_ids(
migrator = migration.EventTypeIDMigration(None, None)
recorder_mock.queue_task(migrator.task(migrator))
await _async_wait_migration_done(hass)
await _async_wait_migration_done(hass)
def _fetch_migrated_events():
with session_scope(hass=hass, read_only=True) as session:
@ -943,6 +944,7 @@ async def test_migrate_entity_ids(hass: HomeAssistant, recorder_mock: Recorder)
migrator = migration.EntityIDMigration(old_db_schema.SCHEMA_VERSION, {})
recorder_mock.queue_task(migration.CommitBeforeMigrationTask(migrator))
await _async_wait_migration_done(hass)
await _async_wait_migration_done(hass)
def _fetch_migrated_states():
with session_scope(hass=hass, read_only=True) as session:
@ -1022,6 +1024,7 @@ async def test_post_migrate_entity_ids(
migrator = migration.EntityIDPostMigration(None, None)
recorder_mock.queue_task(migrator.task(migrator))
await _async_wait_migration_done(hass)
await _async_wait_migration_done(hass)
def _fetch_migrated_states():
with session_scope(hass=hass, read_only=True) as session:
@ -1080,6 +1083,7 @@ async def test_migrate_null_entity_ids(
migrator = migration.EntityIDMigration(old_db_schema.SCHEMA_VERSION, {})
recorder_mock.queue_task(migration.CommitBeforeMigrationTask(migrator))
await _async_wait_migration_done(hass)
await _async_wait_migration_done(hass)
def _fetch_migrated_states():
with session_scope(hass=hass, read_only=True) as session:
@ -1164,6 +1168,7 @@ async def test_migrate_null_event_type_ids(
migrator = migration.EventTypeIDMigration(None, None)
recorder_mock.queue_task(migrator.task(migrator))
await _async_wait_migration_done(hass)
await _async_wait_migration_done(hass)
def _fetch_migrated_events():
with session_scope(hass=hass, read_only=True) as session: