예제 #1
0
 def testDirectoryMethodsDirInfo(self):
     self.driver.add(DirInfoEvent(1, monitors.EventInfo(
         old_div(self.dir, "dir"), monitors.EventType.Create)))
     self.driver.add(DirInfoEvent(1, monitors.EventInfo(
         old_div(self.dir, "dir"), monitors.EventType.Modify)))
     self.driver.add(DirInfoEvent(1, monitors.EventInfo(
         old_div(self.dir, "dir"), monitors.EventType.Delete)))
     self.driver.run()
예제 #2
0
 def testDirectoryInDirectory(self):
     self.driver.add(
         DirInfoEvent(
             1,
             monitors.EventInfo(self.dir / "root" / "dir",
                                monitors.EventType.Create)))
     self.driver.add(
         DirInfoEvent(
             1,
             monitors.EventInfo(self.dir / "root" / "dir" / "dir",
                                monitors.EventType.Create)))
     self.driver.run()
예제 #3
0
 def testBasicAdd(self):
     self.driver.add(
         DirInfoEvent(
             1,
             monitors.EventInfo(self.dir / "root" / "dirtimeout",
                                monitors.EventType.Create)))
     self.driver.run()
예제 #4
0
 def testWithSingleImport(self):
     f = self.dir / "root" / "file"
     self.client.files = {str(f): [str(f)]}
     self.driver.add(DirInfoEvent(0, monitors.EventInfo(
         self.dir / "root" / "file", monitors.EventType.Create)))
     self.driver.run()
     time.sleep(0.25)
예제 #5
0
 def testWithMultiImport(self):
     f1 = str(self.dir / "root" / "file1")
     f2 = str(self.dir / "root" / "file2")
     f3 = str(self.dir / "root" / "file3")
     f4 = str(self.dir / "root" / "file4")
     self.client.files = {f1: [f1, f2, f3, f4]}
     self.client.setDirImportWait(1)
     self.driver.add(DirInfoEvent(0.0, monitors.EventInfo(
         f1, monitors.EventType.Create)))
     self.driver.add(DirInfoEvent(100, monitors.EventInfo(
         f2, monitors.EventType.Create)))
     self.driver.add(DirInfoEvent(200, monitors.EventInfo(
         f3, monitors.EventType.Create)))
     self.driver.add(DirInfoEvent(300, monitors.EventInfo(
         f4, monitors.EventType.Create)))
     time.sleep(1)
     self.driver.run()
예제 #6
0
 def testDirectoryDoesntExistOnDelete(self):
     self.driver.add(DirInfoEvent(1, monitors.EventInfo(
         old_div(self.dir, "dir"), monitors.EventType.Delete)))
     self.driver.run()
     self.assertErrors()
예제 #7
0
 def testDirectoryDoesntExistOnModify(self):
     self.driver.add(DirInfoEvent(1, monitors.EventInfo(
         self.dir / "dir", monitors.EventType.Modify)))
     self.driver.run()
     self.assertErrors()