def testSerializeIncorrectType(self): with self.assertRaisesRegexp(ValueError, "type"): objects.ToCategorizedPath("MEMORY", ["foo", "bar"])
def testSerializeOsRoot(self): path_type = objects.PathInfo.PathType.OS path = objects.ToCategorizedPath(path_type, []) self.assertEqual(path, "fs/os")
def testSerializeTemp(self): path_type = objects.PathInfo.PathType.TEMP path = objects.ToCategorizedPath(path_type, ["blargh"]) self.assertEqual(path, "temp/blargh")
def testSerializeRegistry(self): path_type = objects.PathInfo.PathType.REGISTRY path = objects.ToCategorizedPath(path_type, ["thud", "baz"]) self.assertEqual(path, "registry/thud/baz")
def testSerializeTsk(self): path_type = objects.PathInfo.PathType.TSK path = objects.ToCategorizedPath(path_type, ["quux", "norf"]) self.assertEqual(path, "fs/tsk/quux/norf")
def testSerializeOs(self): path_type = objects.PathInfo.PathType.OS path = objects.ToCategorizedPath(path_type, ["foo", "bar"]) self.assertEqual(path, "fs/os/foo/bar")