15181: Tweak a few more integration tests to request fewer resources
[arvados.git] / sdk / cwl / tests / test_container.py
index c270b9d383b9231f14098d2e861b35a78f162a39..c22ece38b62259a12d8f05842b2cf2ce0a2b02fb 100644 (file)
@@ -56,6 +56,9 @@ class CollectionMock(object):
 
 class TestContainer(unittest.TestCase):
 
+    def setUp(self):
+        cwltool.process._names = set()
+
     def helper(self, runner, enable_reuse=True):
         document_loader, avsc_names, schema_metadata, metaschema_loader = cwltool.process.get_schema("v1.1")
 
@@ -324,7 +327,7 @@ class TestContainer(unittest.TestCase):
         call_args, call_kwargs = runner.api.container_requests().create.call_args
 
         vwdmock.copy.assert_has_calls([mock.call('bar', 'foo', source_collection=sourcemock)])
-        vwdmock.copy.assert_has_calls([mock.call('', 'foo2', source_collection=sourcemock)])
+        vwdmock.copy.assert_has_calls([mock.call('.', 'foo2', source_collection=sourcemock)])
         vwdmock.copy.assert_has_calls([mock.call('baz/filename', 'filename', source_collection=sourcemock)])
         vwdmock.copy.assert_has_calls([mock.call('subdir', 'subdir', source_collection=sourcemock)])
 
@@ -823,6 +826,9 @@ class TestContainer(unittest.TestCase):
 
 
 class TestWorkflow(unittest.TestCase):
+    def setUp(self):
+        cwltool.process._names = set()
+
     def helper(self, runner, enable_reuse=True):
         document_loader, avsc_names, schema_metadata, metaschema_loader = cwltool.process.get_schema("v1.1")
 
@@ -958,7 +964,7 @@ class TestWorkflow(unittest.TestCase):
             }))
         mockc.open().__enter__().write.assert_has_calls([mock.call(subwf)])
         mockc.open().__enter__().write.assert_has_calls([mock.call(
-bytes(b'''{
+'''{
   "fileblub": {
     "basename": "token.txt",
     "class": "File",
@@ -966,7 +972,7 @@ bytes(b'''{
     "size": 0
   },
   "sleeptime": 5
-}'''))])
+}''')])
 
     # The test passes no builder.resources
     # Hence the default resources will apply: {'cores': 1, 'ram': 1024, 'outdirSize': 1024, 'tmpdirSize': 1024}