def test_config_to_get_to_right(self): running_config_hier = HConfig(host=self.host_a) running_config_hier.add_child("do not add me") generated_config_hier = HConfig(host=self.host_a) generated_config_hier.add_child("do not add me") generated_config_hier.add_child("add me") delta = HConfig(host=self.host_a) running_config_hier._config_to_get_to_right(generated_config_hier, delta) assert "do not add me" not in delta assert "add me" in delta
def test_config_to_get_to_right(self): running_config_hier = HConfig(host=self.host_a) running_config_hier.add_child('do not add me') compiled_config_hier = HConfig(host=self.host_a) compiled_config_hier.add_child('do not add me') compiled_config_hier.add_child('add me') delta = HConfig(host=self.host_a) running_config_hier._config_to_get_to_right(compiled_config_hier, delta) self.assertNotIn('do not add me', delta) self.assertIn('add me', delta)