11 import arvados.collection
14 from cwltool.pathmapper import MapperEnt
15 from .mock_discovery import get_rootDesc
17 from arvados_cwl.fsaccess import CollectionCache
19 class TestFsAccess(unittest.TestCase):
20 @mock.patch("arvados.collection.CollectionReader")
21 def test_collection_cache(self, cr):
22 cache = CollectionCache(mock.MagicMock(), mock.MagicMock(), 4)
23 c1 = cache.get("99999999999999999999999999999991+99")
24 c2 = cache.get("99999999999999999999999999999991+99")
26 self.assertEqual(1, cr.call_count)
27 c3 = cache.get("99999999999999999999999999999992+99")
28 self.assertEqual(2, cr.call_count)