コード例 #1
0
 def testCheckFileStoragePath(self):
     path = os.path.join(self.allowed_paths[0], "allowedsubdir")
     os.mkdir(path)
     result = filestorage.CheckFileStoragePath(
         path, _allowed_paths_file=self.allowed_paths_filename)
     self.assertEqual(None, result)
コード例 #2
0
 def testCheckFileStoragePathNotAllowed(self):
     path = os.path.join(self.tmpdir, "notallowed")
     result = filestorage.CheckFileStoragePath(
         path, _allowed_paths_file=self.allowed_paths_filename)
     self.assertTrue("not acceptable" in result)