'Setup and scan a picture and test api error.'

def test_openalpr_process_image_api_timeout(self, aioclient_mock):

    aioclient_mock.get(self.url, content='image')
    aioclient_mock.post(OPENALPR_API_URL, params=self.params, exc=asyncio.TimeoutError())
    ip.scan(self.hass, entity_id='image_processing.test_local')
    self.hass.block_till_done()
    assert (len(aioclient_mock.mock_calls) == 2)
    assert (len(self.alpr_events) == 0)
