def testAssertSiteParameters(self):
    """Test that a chromeos SiteConfig contains the necessary parameters."""
    # Check that our config contains site-independent parameters.
    self.assertTrue(
        config_lib_unittest.AssertSiteIndependentParameters(self.all_configs))

    # Enumerate the necessary chromeos site parameter keys.
    chromeos_params = config_lib.DefaultSiteParameters().keys()

    # Check that our config contains all chromeos specific site parameters.
    site_params = self.all_configs.params
    self.assertTrue(all([x in site_params for x in chromeos_params]))
    def testSaveLoadEmpty(self):
        config = config_lib.SiteConfig(defaults={}, site_params={})
        config_str = config.SaveConfigToString()
        loaded = config_lib.LoadConfigFromString(config_str)

        self.assertEqual(config, loaded)

        self.assertEqual(loaded.keys(), [])
        self.assertEqual(loaded._templates.keys(), [])
        self.assertEqual(loaded.GetDefault(), config_lib.DefaultSettings())
        self.assertEqual(
            loaded.params,
            config_lib.SiteParameters(config_lib.DefaultSiteParameters()))

        self.assertNotEqual(loaded.SaveConfigToString(), '')

        # Make sure we can dump debug content without crashing.
        self.assertNotEqual(loaded.DumpExpandedConfigToString(), '')