def test_check_error_finding_nonexistent_uuid(self): BAD_UUID = 'zzzzz-zzzzz-zzzzzzzzzzzzzzz' self.authorize_with('active') try: result = arv_put.desired_project_uuid(arv_put.api_client, BAD_UUID, 0) except ValueError as error: self.assertIn(BAD_UUID, error.message) else: self.assertFalse(result, "incorrectly found nonexistent project")
def test_check_error_finding_nonexistent_uuid(self): BAD_UUID = 'zzzzz-zzzzz-zzzzzzzzzzzzzzz' self.authorize_with('active') try: result = arv_put.desired_project_uuid(arv_put.api_client, BAD_UUID, 0) except ValueError as error: self.assertIn(BAD_UUID, str(error)) else: self.assertFalse(result, "incorrectly found nonexistent project")
def test_check_error_finding_nonexistent_project(self): BAD_UUID = 'zzzzz-tpzed-zzzzzzzzzzzzzzz' self.authorize_with('active') with self.assertRaises(apiclient.errors.HttpError): result = arv_put.desired_project_uuid(arv_put.api_client, BAD_UUID, 0)
def test_check_real_project_found(self): self.authorize_with('active') self.assertTrue(arv_put.desired_project_uuid(arv_put.api_client, self.PROJECT_UUID, 0), "did not correctly find test fixture project")