def expire(self): TempObj.expire(self) for f in self.uploaded_files: try: os.remove(f['encrypted_path']) except Exception: pass
def expire(self): TempObj.expire(self) for f in self.uploaded_files: try: os.remove(f['encrypted_path']) except: pass
def test_object_expire(self): """ call the expire and checks that the object is expired """ c = task.Clock() # deterministic clock objs_dict = {} obj = TempObj(objs_dict, uuid4(), 1, c) obj.expire() self.assertIsNone(obj._expireCall)
def test_object_expire(self): """ call the expire and checks that the object is expired """ c = task.Clock() # deterministic clock objs_dict = {} obj = TempObj(objs_dict, uuid4(), 1, c) obj.expire() self.assertIsNone(obj._expireCall)