def test_get_job_specs_validates_jobid(self): invalid_job_ids = ['/1/1', '123', '1/2/a', '1//'] for job_id in invalid_job_ids: with self.assertRaises(BadParameterException): utils.get_job_specs(job_id)
def _test_specs(job, expected_job_id, expected_endpoint): self.assertEqual( utils.get_job_specs(job), (expected_job_id, conf.get_apikey(expected_endpoint)), )