Retrieve manifest_text from API server. If that fails, emit a warning
[arvados.git] / sdk / python / test_pipeline_template.py
index bd780a30cf507dfff752e4d5817a36bb61b8c1a8..d7cb105996fb019fd637e1801b532c4e42d1d988 100644 (file)
@@ -8,7 +8,7 @@ import apiclient
 
 class PipelineTemplateTest(unittest.TestCase):
     def runTest(self):
-        pt_uuid = arvados.service.pipeline_templates().create(
+        pt_uuid = arvados.api('v1').pipeline_templates().create(
             body={'name':__file__}
             ).execute()['uuid']
         self.assertEqual(len(pt_uuid), 27,
@@ -22,7 +22,7 @@ class PipelineTemplateTest(unittest.TestCase):
             'spass_box': False,
             'spass-box': [True, 'Maybe', False]
             }
-        update_response = arvados.service.pipeline_templates().update(
+        update_response = arvados.api('v1').pipeline_templates().update(
             uuid=pt_uuid,
             body={'components':components}
             ).execute()
@@ -34,19 +34,19 @@ class PipelineTemplateTest(unittest.TestCase):
         self.assertEqual(update_response['name'], __file__,
                          'update() response has a different name (%s, not %s)'
                          % (update_response['name'], __file__))
-        get_response = arvados.service.pipeline_templates().get(
+        get_response = arvados.api('v1').pipeline_templates().get(
             uuid=pt_uuid
             ).execute()
         self.assertEqual(get_response['components'], components,
                          'components got munged by server (%s -> %s)'
                          % (components, update_response['components']))
-        delete_response = arvados.service.pipeline_templates().delete(
+        delete_response = arvados.api('v1').pipeline_templates().delete(
             uuid=pt_uuid
             ).execute()
         self.assertEqual(delete_response['uuid'], pt_uuid,
                          'delete() response has wrong uuid (%s, not %s)'
                          % (delete_response['uuid'], pt_uuid))
         with self.assertRaises(apiclient.errors.HttpError):
-            geterror_response = arvados.service.pipeline_templates().get(
+            geterror_response = arvados.api('v1').pipeline_templates().get(
                 uuid=pt_uuid
                 ).execute()