

def test_recognize_chunk_raises_exception_when_worker_sends_error_response(self):
    response = createErrorResultsMessage()
    self.worker_socket.set_messages([response.SerializeToString()])
    self.worker.connect_to_worker('en-GB')
    self.assertRaises(WorkerInternalError, (lambda : self.worker.recognize_chunk(b'some binary chunk encoded in base64', frame_rate=44100)))

dataset/ETHPy150Open UFAL-DSG/cloud-asr/cloudasr/api/test_lib.py TestFrontendWorker.test_recognize_chunk_raises_exception_when_worker_sends_error_response/original