def setUp(self): """Set things up for running tests.""" super(PosixTest, self).setUp() self.po = PosixOperations() # mock the sanity check, to ease testing self.po._sanity_check = lambda x: x
def __init__(self, user_id, storage=None, pickle_storage=None, rest_client=None, account=None, pubkeys=None, host_institute=None, use_user_cache=False): """ Initialisation. @type vsc_user_id: string representing the user's VSC ID (vsc[0-9]{5}) """ super(VscTier2AccountpageUser, self).__init__(user_id, rest_client, account=account, pubkeys=pubkeys, use_user_cache=use_user_cache) # Move to vsc-config? default_pickle_storage = { GENT: VSC_SCRATCH_KYUKON, BRUSSEL: VSC_SCRATCH_THEIA, } if host_institute is None: host_institute = GENT self.host_institute = host_institute if pickle_storage is None: pickle_storage = default_pickle_storage[host_institute] self.pickle_storage = pickle_storage if storage is None: storage = VscStorage() self.institute_path_templates = storage.path_templates[ self.host_institute] self.institute_storage = storage[self.host_institute] self.vsc = VSC() self.gpfs = GpfsOperations() # Only used when needed self.posix = PosixOperations()
def __init__(self, user_id, storage=None, pickle_storage='VSC_SCRATCH_KYUKON', rest_client=None, account=None, pubkeys=None, host_institute=None, use_user_cache=False): """ Initialisation. @type vsc_user_id: string representing the user's VSC ID (vsc[0-9]{5}) """ super(VscTier2AccountpageUser, self).__init__(user_id, rest_client, account=account, pubkeys=pubkeys, use_user_cache=use_user_cache) self.pickle_storage = pickle_storage if not storage: self.storage = VscStorage() else: self.storage = storage self.vsc = VSC() self.gpfs = GpfsOperations() # Only used when needed self.posix = PosixOperations() self.host_institute = host_institute