def test_check_general_settings_form_storage(self):
for route, info in self.forms_by_route_and_info.iteritems():
# Need to fill data again
resp = self.layer['browser'].get(self.layer['route_url'](route))
form = resp.form
for key, default_value in info.iteritems():
form[key] = default_value
form.submit("submit")
# Now check for persistence
root = self.layer['root']
for key, default_value in info.iteritems():
if key == "runs_from" or key == "runs_to":
self.assertEqual(date.strftime(getattr(root, key), "%Y-%m-%d"), default_value)
else:
self.assertEqual(getattr(root, key), default_value)