1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Use built-in test helpers on 3.8 (#34901)

This commit is contained in:
Paulus Schoutsen
2020-04-30 13:29:50 -07:00
committed by GitHub
parent 6b16c34fd0
commit ec47216388
303 changed files with 1163 additions and 1320 deletions

View File

@@ -6,7 +6,6 @@ from datetime import timedelta
import logging
from unittest import mock
import asynctest
import pytest
import voluptuous as vol
@@ -19,6 +18,7 @@ from homeassistant.helpers import config_validation as cv, script
from homeassistant.helpers.event import async_call_later
import homeassistant.util.dt as dt_util
from tests.async_mock import patch
from tests.common import (
async_capture_events,
async_fire_time_changed,
@@ -776,7 +776,7 @@ async def test_condition_basic(hass, script_mode):
@pytest.mark.parametrize("script_mode", _BASIC_SCRIPT_MODES)
@asynctest.patch("homeassistant.helpers.script.condition.async_from_config")
@patch("homeassistant.helpers.script.condition.async_from_config")
async def test_condition_created_once(async_from_config, hass, script_mode):
"""Test that the conditions do not get created multiple times."""
sequence = cv.SCRIPT_SCHEMA(