582
582
os.rename(fromdir, todir)
583
583
return self._deferred
585
def test_delete_inside_moving_directory(self):
586
'''Test to assure that the DELETE signal has the correct path.'''
588
basedir = os.path.join(self.root_dir, "basedir")
590
self.fs.create(path=basedir, share_id='', is_dir=True)
593
dir1 = os.path.join(basedir, "inside_d")
594
dir2 = os.path.join(basedir, "new_d")
595
fromfile = os.path.join(dir1, "test_f")
596
tofile = os.path.join(dir2, "test_f")
598
open(fromfile, "w").close()
601
("FS_DIR_MOVE", dir1, dir2),
602
("FS_FILE_DELETE", tofile),
604
self.eq.subscribe(DynamicHitMe(should_events, self))
605
self.eq.inotify_add_watch(self.root_dir)
606
self.eq.inotify_add_watch(basedir)
607
self.eq.inotify_add_watch(dir1)
610
os.rename(dir1, dir2)
612
return self._deferred
585
615
class FreezeTests(BaseTwisted):
586
616
'''Test the freeze mechanism.'''