コード例 #1
0
ファイル: token.py プロジェクト: nyimbi/GlobaLeaks
 def expire(self):
     TempObj.expire(self)
     for f in self.uploaded_files:
         try:
             os.remove(f['encrypted_path'])
         except Exception:
             pass
コード例 #2
0
ファイル: token.py プロジェクト: nsfw/GlobaLeaks
 def expire(self):
     TempObj.expire(self)
     for f in self.uploaded_files:
         try:
             os.remove(f['encrypted_path'])
         except:
             pass
コード例 #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)
コード例 #4
0
ファイル: test_tempobj.py プロジェクト: keichacon/GlobaLeaks
    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)