'Grab a image from camera entity.'

@patch('homeassistant.components.camera.demo.DemoCamera.camera_image', autospec=True, return_value='Test')
def test_get_image_from_camera(self, mock_camera):

    self.hass.start()
    image = run_coroutine_threadsafe(camera.async_get_image(self.hass, 'camera.demo_camera'), self.hass.loop).result()
    assert mock_camera.called
    assert (image == 'Test')
