def test_fast_save(self): handler = ContextHandler() handler.bind(SimpleWidget) widget = SimpleWidget() handler.initialize(widget) context = widget.current_context = handler.new_context() handler.fast_save(widget, 'context_setting', 55) self.assertEqual(context.values['context_setting'], 55)
def test_fast_save(self): handler = ContextHandler() handler.bind(SimpleWidget) widget = SimpleWidget() handler.initialize(widget) context = widget.current_context = handler.new_context() handler.fast_save(widget, 'context_setting', 55) self.assertEqual(context.values['context_setting'], 55) self.assertEqual(handler.known_settings['context_setting'].default, SimpleWidget.context_setting.default)
def test_fast_save(self): handler = ContextHandler() handler.bind(SimpleWidget) widget = SimpleWidget() handler.initialize(widget) context = widget.current_context = handler.new_context() handler.fast_save(widget, "context_setting", 55) self.assertEqual(context.values["context_setting"], 55) self.assertEqual( handler.known_settings["context_setting"].default, SimpleWidget.context_setting.default, )