Пример #1
0
 def testSerializeIncorrectType(self):
     with self.assertRaisesRegexp(ValueError, "type"):
         rdf_objects.ToCategorizedPath("MEMORY", ["foo", "bar"])
Пример #2
0
 def testSerializeOsRoot(self):
     path_type = rdf_objects.PathInfo.PathType.OS
     path = rdf_objects.ToCategorizedPath(path_type, [])
     self.assertEqual(path, "fs/os")
Пример #3
0
 def testSerializeTemp(self):
     path_type = rdf_objects.PathInfo.PathType.TEMP
     path = rdf_objects.ToCategorizedPath(path_type, ["blargh"])
     self.assertEqual(path, "temp/blargh")
Пример #4
0
 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
 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
 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")