Exemplo n.º 1
0
 def expire(self):
     TempObj.expire(self)
     for f in self.uploaded_files:
         try:
             os.remove(f['encrypted_path'])
         except Exception:
             pass
Exemplo n.º 2
0
 def expire(self):
     TempObj.expire(self)
     for f in self.uploaded_files:
         try:
             os.remove(f['encrypted_path'])
         except:
             pass
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)