def testParseParameters(self):
    """Tests _ParseParameters()."""
    mod_type = 'site'
    target = 'foouser'
    pkg_name = 'Foo%20Pkg-1.2'
    pkg_name_unquoted = urllib.unquote(pkg_name)

    manifests = ['unstable', 'testing']
    install_types = ['optional_installs', 'managed_updates']

    self.request.get_all('install_types').AndReturn(install_types)
    self.request.get_all('manifests').AndReturn(manifests)

    self.mox.ReplayAll()

    self.c._ParseParameters(mod_type, target, pkg_name)

    self.assertEqual(self.c.mod_type, mod_type)
    self.assertEqual(self.c.target, target)
    self.assertEqual(self.c.pkg_name, pkg_name_unquoted)
    self.assertEqual(self.c.model, dyn_man.models.MANIFEST_MOD_MODELS[mod_type])
    self.assertEqual(self.c.manifests, manifests)
    self.assertEqual(self.c.install_types, install_types)
    self.assertEqual(self.c.key_name, '%s##%s' % (target, pkg_name_unquoted))

    self.mox.VerifyAll()
dataset/ETHPy150Open google/simian/src/tests/simian/mac/api/dynamic_manifest_test.py/DynamicManifestHandlersTest.testParseParameters/original