From 8c4957a324bf4685bbdacbfebc59fd8f64393d8d Mon Sep 17 00:00:00 2001 From: Mattias Welponer Date: Sat, 23 Jun 2018 09:23:15 +0200 Subject: [PATCH] Move 3th party lib inside function --- tests/components/homematicip_cloud/test_hap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/components/homematicip_cloud/test_hap.py b/tests/components/homematicip_cloud/test_hap.py index 3f3be8bf422..06d95e6753c 100644 --- a/tests/components/homematicip_cloud/test_hap.py +++ b/tests/components/homematicip_cloud/test_hap.py @@ -6,8 +6,6 @@ from homeassistant.components import homematicip_cloud as hmipc from tests.common import mock_coro -from homematicip.base.base_connection import HmipConnectionError - async def test_hap_init(aioclient_mock): """Test a successful setup.""" @@ -31,6 +29,8 @@ async def test_hap_init(aioclient_mock): async def test_hap_setup_invalid_token(): """Test we start config flow if username is no longer whitelisted.""" + from homematicip.base.base_connection import HmipConnectionError + hass = Mock() entry = Mock() entry.data = {