10846: Remove duplicate log message suppression by ComputeNodeMonitorActor
[arvados.git] / sdk / cwl / tests / test_submit.py
index 31d7c2bf08fe5048448b2962978da6980eb3f87d..bbff612a64ce0869b2e85fd1478236593d663209 100644 (file)
@@ -233,9 +233,10 @@ def stubs(func):
 
 
 class TestSubmit(unittest.TestCase):
+    @mock.patch("arvados_cwl.runner.arv_docker_get_image")
     @mock.patch("time.sleep")
     @stubs
-    def test_submit(self, stubs, tm):
+    def test_submit(self, stubs, tm, arvdock):
         capture_stdout = cStringIO.StringIO()
         exited = arvados_cwl.main(
             ["--submit", "--no-wait", "--api=jobs", "--debug",
@@ -260,6 +261,11 @@ class TestSubmit(unittest.TestCase):
             }), ensure_unique_name=True),
             mock.call().execute()])
 
+        arvdock.assert_has_calls([
+            mock.call(stubs.api, {"class": "DockerRequirement", "dockerPull": "debian:8"}, True, None),
+            mock.call(stubs.api, {'dockerPull': 'arvados/jobs:'+arvados_cwl.__version__}, True, None)
+        ])
+
         expect_pipeline = copy.deepcopy(stubs.expect_pipeline_instance)
         stubs.api.pipeline_instances().create.assert_called_with(
             body=JsonDiffMatcher(expect_pipeline))