X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a1819526b85ce37c7d3ae421c2f5329c1c245c7f..595d517e5293855690fdc65255648c32970dd31d:/services/fuse/tests/mount_test_base.py diff --git a/services/fuse/tests/mount_test_base.py b/services/fuse/tests/mount_test_base.py index 37e0d51cc9..3b7cbaaadb 100644 --- a/services/fuse/tests/mount_test_base.py +++ b/services/fuse/tests/mount_test_base.py @@ -1,8 +1,6 @@ import arvados import arvados.safeapi import arvados_fuse as fuse -import glob -import json import llfuse import os import shutil @@ -19,7 +17,7 @@ import run_test_server logger = logging.getLogger('arvados.arv-mount') class MountTestBase(unittest.TestCase): - def setUp(self): + def setUp(self, api=None): # The underlying C implementation of open() makes a fstat() syscall # with the GIL still held. When the GETATTR message comes back to # llfuse (which in these tests is in the same interpreter process) it @@ -34,7 +32,7 @@ class MountTestBase(unittest.TestCase): self.mounttmp = tempfile.mkdtemp() run_test_server.run() run_test_server.authorize_with("admin") - self.api = arvados.safeapi.ThreadSafeApiCache(arvados.config.settings()) + self.api = api if api else arvados.safeapi.ThreadSafeApiCache(arvados.config.settings()) def make_mount(self, root_class, **root_kwargs): self.operations = fuse.Operations(os.getuid(), os.getgid(), enable_write=True)