Exemplo n.º 1
0
 def testFindFilesInDirectoryADayOrOlderFromNow(self):
     files = directoryListing.getFilesOlderThan(self.temp_dir_path, 1)
     self.assertEqual("file2.txt", files[0].Name)
     self.assertEqual("file3.txt", files[1].Name)
Exemplo n.º 2
0
 def testFindThreeFilesInDirectory(self):
     files = directoryListing.getFilesOlderThan(self.temp_dir_path)
     self.assertEqual("file1.txt", files[0].Name)
     self.assertEqual("file2.txt", files[1].Name)
     self.assertEqual("file3.txt", files[2].Name)
Exemplo n.º 3
0
 def testFindFilesInDirectoryTwoDaysOrOlderFromNow(self):
     files = directoryListing.getFilesOlderThan(self.temp_dir_path,2)
     self.assertEqual("file3.txt", files[0].Name)
Exemplo n.º 4
0
 def testDeleteAllFilesInDirectory(self):
     files = directoryListing.getFilesOlderThan(self.temp_dir_path)
     deleteFiles.deleteFiles(files)
     self.assertEqual(0, len(Directory.GetFileSystemEntries(self.temp_dir_path)))
Exemplo n.º 5
0
 def testFindThreeFilesInDirectory(self):
     files = directoryListing.getFilesOlderThan(self.temp_dir_path)
     self.assertEqual("file1.txt", files[0].Name)
     self.assertEqual("file2.txt", files[1].Name)
     self.assertEqual("file3.txt", files[2].Name)