Fix more tests on Python 3.8 (#34703)
This commit is contained in:
1 parent
5760fb94fe
commit
e7f8d6bbf7
7 files changed
+34
-55
No files matched your search
@@ -2,8 +2,8 @@
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
import json
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from asynctest import Mock, patch
|
||||
import pytest
|
||||
|
||||
from homeassistant.const import (
|
||||
@@ -14,7 +14,7 @@ from homeassistant.core import CoreState
|
||||
from homeassistant.helpers import storage
|
||||
from homeassistant.util import dt
|
||||
|
||||
from tests.common import async_fire_time_changed, mock_coro
|
||||
from tests.common import async_fire_time_changed
|
||||
|
||||
MOCK_VERSION = 1
|
||||
MOCK_KEY = "storage-test"
|
||||
@@ -189,7 +189,7 @@ async def test_writing_while_writing_delay(hass, store, hass_storage):
|
||||
async def test_migrator_no_existing_config(hass, store, hass_storage):
|
||||
"""Test migrator with no existing config."""
|
||||
with patch("os.path.isfile", return_value=False), patch.object(
|
||||
store, "async_load", return_value=mock_coro({"cur": "config"})
|
||||
store, "async_load", return_value={"cur": "config"}
|
||||
):
|
||||
data = await storage.async_migrator(hass, "old-path", store)
|
||||
|
||||
|
||||
Reference in new issue
Block a user