예제 #1
0
 def __init__(self, query):
     self.query = query
     self.filterObject = None
     self.crawlerObject = None
     self.fileHandler = fsh.FileSystemHandler()
예제 #2
0
 def testInit(self):
     f = fsh.FileSystemHandler()
     self.assertTrue(os.path.isdir(f.getRootDirectory()))
예제 #3
0
 def __init__(self, query):
     self.query = query
     self.handler = fsh.FileSystemHandler()
     self.rootDirectory = self.handler.getRootDirectory()
예제 #4
0
 def testDeleteSessionTempFiles(self):
     f = fsh.FileSystemHandler()
     dataDir = f.getRootDirectory()
     f.deleteSessionTempFiles(dataDir)
     self.assertFalse(os.path.isdir(dataDir + f.getSlashForOsVersion() + "testIfMkDir"))
예제 #5
0
 def testGetSearchFilePath(self):
      f = fsh.FileSystemHandler()
      subdir, filename = "c++", "vector.txt"
      filePath = f.getRootDirectory() + f.getSlashForOsVersion() + subdir + f.getSlashForOsVersion() + filename
      self.assertEqual(f.getSearchFilePath(subdir, filename), filePath)
예제 #6
0
 def testCheckDirElseMkDir(self):
     f = fsh.FileSystemHandler()
     testFolder = f.getRootDirectory() +  f.getSlashForOsVersion() + "testIfMkDir"
     f.checkDirElseMkDir(testFolder)
     self.assertTrue(os.path.isdir(testFolder))
예제 #7
0
 def testGetSlashForOsVersion(self):
     f = fsh.FileSystemHandler()
     self.assertEqual(f.getSlashForOsVersion(), "/")
예제 #8
0
 def testGetRootDirectory(self):
     rootDir = "/home/philipp/Dokumente/5. Semester/Softwarepraktikum_Chatbot/chatbot-alpha/chatbot-alpha-001/tests/data"
     f = fsh.FileSystemHandler()
     self.assertEqual(f.getRootDirectory(), rootDir)