10081: Dump as yaml instead of json. Add test for extracted subworkflow.
[arvados.git] / sdk / cwl / tests / test_job.py
index 9d97096d324feb2d4c83f5c57bb9b756dea46afb..9a7199ea2a4df5d46029cc4b0324c12b5727f73c 100644 (file)
@@ -1,4 +1,3 @@
-
 import logging
 import mock
 import unittest
@@ -222,6 +221,12 @@ class TestWorkflow(unittest.TestCase):
         it.next().run()
         it.next().run()
 
+        with open("tests/wf/scatter2_subwf.cwl") as f:
+            subwf = f.read()
+
+        mockcollection().open().__enter__().write.assert_has_calls([mock.call(subwf)])
+        mockcollection().open().__enter__().write.assert_has_calls([mock.call('{"sleeptime":5}')])
+
         runner.api.jobs().create.assert_called_with(
             body={
                 'minimum_script_version': '9e5b98e8f5f4727856b53447191f9c06e3da2ba6',