3 # ARVADOS_API_TOKEN=abc ARVADOS_API_HOST=arvados.local python -m unittest discover
9 class PipelineTemplateTest(unittest.TestCase):
11 pt_uuid = arvados.service.pipeline_templates().create(
12 body={'name':__file__}
14 self.assertEqual(len(pt_uuid), 27,
15 'Unexpected format of pipeline template UUID ("%s")'
19 '-x-': [1,2,{'foo':'bar'}],
20 'Boggis': {'Bunce': '[\'Bean\']'},
23 'spass-box': [True, 'Maybe', False]
25 update_response = arvados.service.pipeline_templates().update(
27 body={'components':components}
29 self.assertEqual('uuid' in update_response, True,
30 'update() response did not include a uuid')
31 self.assertEqual(update_response['uuid'], pt_uuid,
32 'update() response has a different uuid (%s, not %s)'
33 % (update_response['uuid'], pt_uuid))
34 self.assertEqual(update_response['name'], __file__,
35 'update() response has a different name (%s, not %s)'
36 % (update_response['name'], __file__))
37 get_response = arvados.service.pipeline_templates().get(
40 self.assertEqual(get_response['components'], components,
41 'components got munged by server (%s -> %s)'
42 % (components, update_response['components']))
43 delete_response = arvados.service.pipeline_templates().delete(
46 self.assertEqual(delete_response['uuid'], pt_uuid,
47 'delete() response has wrong uuid (%s, not %s)'
48 % (delete_response['uuid'], pt_uuid))
49 with self.assertRaises(apiclient.errors.HttpError):
50 geterror_response = arvados.service.pipeline_templates().get(