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