示例#1
0
文件: objects_test.py 项目: qsdj/grr
 def testSerializeIncorrectType(self):
     with self.assertRaisesRegexp(ValueError, "type"):
         rdf_objects.ToCategorizedPath("MEMORY", ["foo", "bar"])
示例#2
0
文件: objects_test.py 项目: qsdj/grr
 def testSerializeOsRoot(self):
     path_type = rdf_objects.PathInfo.PathType.OS
     path = rdf_objects.ToCategorizedPath(path_type, [])
     self.assertEqual(path, "fs/os")
示例#3
0
文件: objects_test.py 项目: qsdj/grr
 def testSerializeTemp(self):
     path_type = rdf_objects.PathInfo.PathType.TEMP
     path = rdf_objects.ToCategorizedPath(path_type, ["blargh"])
     self.assertEqual(path, "temp/blargh")
示例#4
0
文件: objects_test.py 项目: qsdj/grr
 def testSerializeRegistry(self):
     path_type = rdf_objects.PathInfo.PathType.REGISTRY
     path = rdf_objects.ToCategorizedPath(path_type, ["thud", "baz"])
     self.assertEqual(path, "registry/thud/baz")
示例#5
0
文件: objects_test.py 项目: qsdj/grr
 def testSerializeTsk(self):
     path_type = rdf_objects.PathInfo.PathType.TSK
     path = rdf_objects.ToCategorizedPath(path_type, ["quux", "norf"])
     self.assertEqual(path, "fs/tsk/quux/norf")
示例#6
0
文件: objects_test.py 项目: qsdj/grr
 def testSerializeOs(self):
     path_type = rdf_objects.PathInfo.PathType.OS
     path = rdf_objects.ToCategorizedPath(path_type, ["foo", "bar"])
     self.assertEqual(path, "fs/os/foo/bar")