Update device_traker for async platforms (#5102)

Async DeviceScanner object, migrate to async, cleanups
This commit is contained in:
Pascal Vizeli authored and Johann Kellerman committed 2017-01-02 21:50:42 +02:00
1 parent 9c6a985c56
commit b2371c6614
26 files changed
+124 -72

No files matched your search

+2 -1
View File
@@ -315,7 +315,8 @@ class TestComponentsDeviceTracker(unittest.TestCase):
scanner = get_component('device_tracker.test').SCANNER
with patch.dict(device_tracker.DISCOVERY_PLATFORMS, {'test': 'test'}):
with patch.object(scanner, 'scan_devices') as mock_scan:
with patch.object(scanner, 'scan_devices',
autospec=True) as mock_scan:
with assert_setup_component(1, device_tracker.DOMAIN):
assert setup_component(
self.hass, device_tracker.DOMAIN, TEST_PLATFORM)