Upgrade to sqlalchemy 1.4.11 (#49538)

This commit is contained in:
J. Nick Koston 2021-04-21 20:29:36 -10:00 committed by GitHub
parent 303ab36c54
commit c10836fcee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 84 additions and 74 deletions

View file

@ -5,12 +5,12 @@ import sqlite3
from unittest.mock import MagicMock, patch
import pytest
from sqlalchemy import text
from homeassistant.components.recorder import run_information_with_session, util
from homeassistant.components.recorder.const import DATA_INSTANCE, SQLITE_URL_PREFIX
from homeassistant.components.recorder.models import RecorderRuns
from homeassistant.components.recorder.util import end_incomplete_runs, session_scope
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.util import dt as dt_util
from .common import corrupt_db_file
@ -55,7 +55,7 @@ def test_recorder_bad_commit(hass_recorder):
def work(session):
"""Bad work."""
session.execute("select * from notthere")
session.execute(text("select * from notthere"))
with patch(
"homeassistant.components.recorder.time.sleep"
@ -122,7 +122,7 @@ async def test_last_run_was_recently_clean(hass):
is False
)
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
await hass.async_add_executor_job(hass.data[DATA_INSTANCE]._end_session)
await hass.async_block_till_done()
assert (