Consolidate all platforms that have no tests (#22096)
* Consolidate * Fix tests * Update imports * Fix import * Use importlib because integration and package share name * Fix more tests * Update .coveragerc and CODEOWNERS
This commit is contained in:
1 parent
d33cad0b24
commit
f5076188ef
742 files changed
+1145
-795
No files matched your search
@@ -1,7 +1,7 @@
|
||||
"""The tests for the manual Alarm Control Panel component."""
|
||||
from datetime import timedelta
|
||||
from unittest.mock import patch, MagicMock
|
||||
from homeassistant.components.alarm_control_panel import demo
|
||||
from homeassistant.components.demo import alarm_control_panel as demo
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.const import (
|
||||
STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY,
|
||||
|
||||
@@ -175,7 +175,7 @@ async def test_gravatar_and_picture(hass):
|
||||
@patch(
|
||||
'homeassistant.components.device_tracker.DeviceTracker.see')
|
||||
@patch(
|
||||
'homeassistant.components.device_tracker.demo.setup_scanner',
|
||||
'homeassistant.components.demo.device_tracker.setup_scanner',
|
||||
autospec=True)
|
||||
async def test_discover_platform(mock_demo_setup_scanner, mock_see, hass):
|
||||
"""Test discovery of device_tracker demo platform."""
|
||||
|
||||
@@ -126,7 +126,7 @@ class TestImageProcessingAlpr:
|
||||
},
|
||||
}
|
||||
|
||||
with patch('homeassistant.components.image_processing.demo.'
|
||||
with patch('homeassistant.components.demo.image_processing.'
|
||||
'DemoImageProcessingAlpr.should_poll',
|
||||
new_callable=PropertyMock(return_value=False)):
|
||||
setup_component(self.hass, ip.DOMAIN, config)
|
||||
@@ -188,7 +188,7 @@ class TestImageProcessingAlpr:
|
||||
assert event_data[0]['confidence'] == 98.3
|
||||
assert event_data[0]['entity_id'] == 'image_processing.demo_alpr'
|
||||
|
||||
@patch('homeassistant.components.image_processing.demo.'
|
||||
@patch('homeassistant.components.demo.image_processing.'
|
||||
'DemoImageProcessingAlpr.confidence',
|
||||
new_callable=PropertyMock(return_value=95))
|
||||
def test_alpr_event_single_call_confidence(self, confidence_mock,
|
||||
@@ -228,7 +228,7 @@ class TestImageProcessingFace:
|
||||
},
|
||||
}
|
||||
|
||||
with patch('homeassistant.components.image_processing.demo.'
|
||||
with patch('homeassistant.components.demo.image_processing.'
|
||||
'DemoImageProcessingFace.should_poll',
|
||||
new_callable=PropertyMock(return_value=False)):
|
||||
setup_component(self.hass, ip.DOMAIN, config)
|
||||
@@ -273,7 +273,7 @@ class TestImageProcessingFace:
|
||||
assert event_data[0]['entity_id'] == \
|
||||
'image_processing.demo_face'
|
||||
|
||||
@patch('homeassistant.components.image_processing.demo.'
|
||||
@patch('homeassistant.components.demo.image_processing.'
|
||||
'DemoImageProcessingFace.confidence',
|
||||
new_callable=PropertyMock(return_value=None))
|
||||
def test_face_event_call_no_confidence(self, mock_config, aioclient_mock):
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user