def testConfirm(self): parameter_data = self.create_parameter_data() editor = SystemParameterEditor(self.store, parameter_data) parameter_data.field_value = None self.assertFalse(editor.validate_confirm()) self.assertFalse(editor.confirm()) editor.model.field_value = u'25' self.assertTrue(editor.confirm()) self.check_editor(editor, 'editor-systemparameter-confirm', [editor.retval])
def test_confirm(self): parameter_data = self.create_parameter_data() detail = sysparam.get_detail_by_name(parameter_data.field_name) editor = SystemParameterEditor(self.store, detail) parameter_data.field_value = None self.assertFalse(editor.validate_confirm()) self.assertFalse(editor.confirm()) editor.model.field_value = self.create_account().id self.assertTrue(editor.confirm()) self.check_editor(editor, 'editor-systemparameter-confirm', [editor.retval])