1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix tests no internet (#6411)

* Fix honeywell tests without internet

* Fix device tracker without internet

* Fix MFI using internet during tests

* Remove I/O from apns tests
This commit is contained in:
Paulus Schoutsen
2017-03-04 17:15:20 -08:00
committed by GitHub
parent 1522e67351
commit b939626497
6 changed files with 201 additions and 110 deletions

View File

@@ -24,7 +24,7 @@ from homeassistant.remote import JSONEncoder
from tests.common import (
get_test_home_assistant, fire_time_changed, fire_service_discovered,
patch_yaml_files, assert_setup_component, mock_restore_cache)
patch_yaml_files, assert_setup_component, mock_restore_cache, mock_coro)
from ...test_util.aiohttp import mock_aiohttp_client
@@ -521,7 +521,9 @@ class TestComponentsDeviceTracker(unittest.TestCase):
timedelta(seconds=0))
assert len(config) == 0
def test_see_state(self):
@patch('homeassistant.components.device_tracker.Device'
'.set_vendor_for_mac', return_value=mock_coro())
def test_see_state(self, mock_set_vendor):
"""Test device tracker see records state correctly."""
self.assertTrue(setup_component(self.hass, device_tracker.DOMAIN,
TEST_PLATFORM))