13306: test_submit additional fixes for py2 unicode support
authorEric Biagiotti <ebiagiotti@veritasgenetcs.com>
Mon, 14 Jan 2019 18:04:55 +0000 (13:04 -0500)
committerEric Biagiotti <ebiagiotti@veritasgenetcs.com>
Mon, 14 Jan 2019 18:04:55 +0000 (13:04 -0500)
Arvados-DCO-1.1-Signed-off-by:  Eric Biagiotti <ebiagiotti@veritasgenetics.com>

sdk/cwl/arvados_cwl/__init__.py
sdk/cwl/tests/test_submit.py

index 4782701641fec3aa5d8135aa735bc065e0a61415..6e45ec57658379299908f347efd7c243d12e5805 100644 (file)
@@ -116,7 +116,7 @@ def arg_parser():  # type: () -> argparse.ArgumentParser
     exgroup.add_argument("--create-template", action="store_true", help="(Deprecated) synonym for --create-workflow.",
                          dest="create_workflow")
     exgroup.add_argument("--create-workflow", action="store_true", help="Create an Arvados workflow (if using the 'containers' API) or pipeline template (if using the 'jobs' API). See --api.")
-    exgroup.add_argument("--update-workflow", type=str, metavar="UUID", help="Update an existing Arvados workflow or pipeline template with the given UUID.")
+    exgroup.add_argument("--update-workflow", metavar="UUID", help="Update an existing Arvados workflow or pipeline template with the given UUID.")
 
     exgroup = parser.add_mutually_exclusive_group()
     exgroup.add_argument("--wait", action="store_true", help="After submitting workflow runner job, wait for completion.",
index 3d5da4f8625ed2db487bbd4b5e449b4eccb7cc9a..eabc88f71a6f8469332a2fe476b0010bb9ed0b2e 100644 (file)
@@ -1840,7 +1840,7 @@ class TestTemplateInputs(unittest.TestCase):
         exited = arvados_cwl.main(
             ["--create-template",
              "tests/wf/inputs_test.cwl", "tests/order/empty_order.json"],
-            io.StringIO(), sys.stderr, api_client=stubs.api)
+            stubs.capture_stdout, sys.stderr, api_client=stubs.api)
         self.assertEqual(exited, 0)
 
         stubs.api.pipeline_templates().create.assert_called_with(
@@ -1851,7 +1851,7 @@ class TestTemplateInputs(unittest.TestCase):
         exited = arvados_cwl.main(
             ["--create-template",
              "tests/wf/inputs_test.cwl", "tests/order/inputs_test_order.json"],
-            io.StringIO(), sys.stderr, api_client=stubs.api)
+            stubs.capture_stdout, sys.stderr, api_client=stubs.api)
         self.assertEqual(exited, 0)
 
         expect_template = copy.deepcopy(self.expect_template)