def test_configuration_update(self): give_user_privilege(self.user, "ADMIN_CONFIG") form_object = dict( ( (k.lower(),v) for k,v in app.config.iteritems()) ) configuration_form = ConfigurationForm(**form_object) configuration_form.server_port.data = 10000 response = self.app.post("/admin/config_update", data=configuration_form.data, follow_redirects = True) assert response.status_code == 200 assert int(get_config_value("SERVER_PORT")) == 10000
def test_configuration_update(self): give_user_privilege(self.user, "ADMIN_CONFIG") form_object = dict(((k.lower(), v) for k, v in app.config.iteritems())) configuration_form = ConfigurationForm(**form_object) configuration_form.server_port.data = 10000 response = self.app.post("/admin/config_update", data=configuration_form.data, follow_redirects=True) assert response.status_code == 200 assert int(get_config_value("SERVER_PORT")) == 10000
def test_set_get_config_value(self): set_config_value("DUMMY", "Initial") assert get_config_value("DUMMY") == "Initial" set_config_value("DUMMY", "Updated") assert get_config_value("DUMMY") == "Updated"