Clean up mock_coro (#6037)
This commit is contained in:
parent
9c176ad85a
commit
75e41a21c9
12 changed files with 37 additions and 42 deletions
|
@ -37,7 +37,7 @@ class TestFFmpegNoiseSetup(object):
|
|||
assert self.hass.data['ffmpeg'].binary == 'ffmpeg'
|
||||
assert len(self.hass.data['ffmpeg'].entities) == 1
|
||||
|
||||
@patch('haffmpeg.SensorNoise.open_sensor', return_value=mock_coro()())
|
||||
@patch('haffmpeg.SensorNoise.open_sensor', return_value=mock_coro())
|
||||
def test_setup_component_start(self, mock_start):
|
||||
"""Setup ffmpeg component."""
|
||||
with assert_setup_component(1, 'binary_sensor'):
|
||||
|
@ -85,7 +85,7 @@ class TestFFmpegMotionSetup(object):
|
|||
assert self.hass.data['ffmpeg'].binary == 'ffmpeg'
|
||||
assert len(self.hass.data['ffmpeg'].entities) == 1
|
||||
|
||||
@patch('haffmpeg.SensorMotion.open_sensor', return_value=mock_coro()())
|
||||
@patch('haffmpeg.SensorMotion.open_sensor', return_value=mock_coro())
|
||||
def test_setup_component_start(self, mock_start):
|
||||
"""Setup ffmpeg component."""
|
||||
with assert_setup_component(1, 'binary_sensor'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue