'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()
    ip.scan(self.hass, entity_id='image_processing.test')
    self.hass.block_till_done()
    state = self.hass.states.get('image_processing.test')
    assert mock_camera.called
    assert (state.state == '1')
    assert (state.attributes['image'] == 'Test')
