Exemplo n.º 1
0
 def test_parent_child_relationships_in_file_system(self):
     # fetch the root FileSystemSnapshot object, grab its children
     path = FileSystemHelper.convertedPath('%AA/TextEdit.app/Contents')
     root = self.p.session.query(FileSystemSnapshot).filter(
         FileSystemSnapshot.abs_path.like(path)).one()
     self.assertTrue(root is not None)
     children = root.children
     for child in children:
         logger.info("{0}".format(child))
Exemplo n.º 2
0
 def test_find_deleted_directory(self):
     self.builder.del_dir("AA/TextEdit.app/Contents/Frameworks")
     self.mergeScan()
     ms = self.p.session.query(FileSystemMerge).filter(
         FileSystemMerge.abs_path.like('%Frameworks')).one()
     self.assertTrue(
         ms.abs_path.endswith(
             FileSystemHelper.convertedPath(
                 "AA/TextEdit.app/Contents/Frameworks")))
     self.assertEqual(PersistentScanningState.ITEM_DELETED, ms.flags)
     self.assertEqual(Qt.Unchecked, ms.checked)