

def test_connect_to_worker_raises_exception_when_no_worker_is_available(self):
    response = createMasterResponseMessage('ERROR')
    self.master_socket.set_messages([response.SerializeToString()])
    self.assertRaises(NoWorkerAvailableError, (lambda : self.worker.connect_to_worker('en-GB')))

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