[ARVADOS] updated: 261d51d1c2551c9e7dc87a8fca23caccfc613df4
Git user
git at public.curoverse.com
Mon Sep 19 12:04:35 EDT 2016
Summary of changes:
sdk/cwl/tests/test_job.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
via 261d51d1c2551c9e7dc87a8fca23caccfc613df4 (commit)
from 110d992e55ed6f8537abb3cb27487ae1f66ca44e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 261d51d1c2551c9e7dc87a8fca23caccfc613df4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Sep 19 12:04:30 2016 -0400
10081: Mock Collection class in TestWorkflow
diff --git a/sdk/cwl/tests/test_job.py b/sdk/cwl/tests/test_job.py
index e95589c..9d97096 100644
--- a/sdk/cwl/tests/test_job.py
+++ b/sdk/cwl/tests/test_job.py
@@ -199,7 +199,8 @@ class TestJob(unittest.TestCase):
class TestWorkflow(unittest.TestCase):
# The test passes no builder.resources
# Hence the default resources will apply: {'cores': 1, 'ram': 1024, 'outdirSize': 1024, 'tmpdirSize': 1024}
- def test_run(self):
+ @mock.patch("arvados.collection.Collection")
+ def test_run(self, mockcollection):
arvados_cwl.add_arv_hints()
runner = arvados_cwl.ArvCwlRunner(mock.MagicMock())
@@ -210,6 +211,8 @@ class TestWorkflow(unittest.TestCase):
tool, metadata = document_loader.resolve_ref("tests/wf/scatter2.cwl")
metadata["cwlVersion"] = tool["cwlVersion"]
+ mockcollection().portable_data_hash.return_value = "f101400a398097d4398cdb3eb5d1a7ca+118"
+
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess, api_client=runner.api)
arvtool = arvados_cwl.ArvadosWorkflow(runner, tool, work_api="jobs", avsc_names=avsc_names,
basedir="", make_fs_access=make_fs_access, loader=document_loader,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list