Ejemplo n.º 1
0
    def test_default_config_cannot_be_changed(self):
        name = factory.getRandomString()
        self.patch(
            maasserver.models.config, "DEFAULT_CONFIG",
            {name: {'key': 'value'}})
        config = Config.objects.get_config(name)
        config.update({'key2': 'value2'})

        self.assertEqual({'key': 'value'}, Config.objects.get_config(name))
Ejemplo n.º 2
0
    def test_default_config_cannot_be_changed(self):
        name = factory.make_string()
        self.patch(
            maasserver.models.config, "DEFAULT_CONFIG",
            {name: {'key': 'value'}})
        config = Config.objects.get_config(name)
        config.update({'key2': 'value2'})

        self.assertEqual({'key': 'value'}, Config.objects.get_config(name))