def setUp(self): self.datadir = get_data_dir('buckets') MS3Server.start(datadir=self.datadir) self.s3 = S3Connection('X', 'Y', is_secure=False, host='localhost', port=9010, calling_format=OrdinaryCallingFormat())
def setUp(self): self.local = tempfile.mkdtemp() self.remote = tempfile.mkdtemp() self.bucket = "test" os.mkdir(os.path.join(self.remote, self.bucket)) self.s3ffs = None # In case there occurs an exception during setUp(), unittest # doesn't call tearDown(), hence we need to make sure we don't # leave any server processes running. try: MS3Server.start(datadir=self.remote) self.s3ffs = s3ffsServer(self.bucket, mountpoint=self.local).start() except Exception: self.tearDown() raise