From 9fafb49af210e956d43d6a00106558d1a00d13df Mon Sep 17 00:00:00 2001 From: Simon Poirier Date: Thu, 02 Jul 2009 05:27:27 +0000 Subject: * Modularized actions and event filters through add-on components * Working serialization * Working editor with addons * began refactoring actions and events ** fixed some tests to work with addons ** filters and actions tests won't pass until refactoring is done --- (limited to 'src/sugar/tutorius/tests/filterstests.py') diff --git a/src/sugar/tutorius/tests/filterstests.py b/src/sugar/tutorius/tests/filterstests.py index 8ee6cc8..3e79bcc 100644 --- a/src/sugar/tutorius/tests/filterstests.py +++ b/src/sugar/tutorius/tests/filterstests.py @@ -26,7 +26,8 @@ import time import gobject import gtk -from sugar.tutorius.filters import EventFilter, TimerEvent, GtkWidgetEventFilter, GtkWidgetTypeFilter +from sugar.tutorius.filters import EventFilter, TimerEvent, GtkWidgetTypeFilter +from sugar.tutorius import addon from gtkutilstests import SignalCatcher class BaseEventFilterTests(unittest.TestCase): @@ -168,7 +169,7 @@ class TestGtkWidgetEventFilter(unittest.TestCase): self.top.add(self.btn1) def test_install(self): - h = GtkWidgetEventFilter("Next","0","whatever") + h = addon.create('GtkWidgetEventFilter', "Next","0","whatever") try: h.install_handlers(None) @@ -177,7 +178,7 @@ class TestGtkWidgetEventFilter(unittest.TestCase): assert True, "Install should have failed" def test_button_clicks(self): - h = GtkWidgetEventFilter("Next","0.0","clicked") + h = addon.create('GtkWidgetEventFilter', "Next","0.0","clicked") s = SignalCatcher() h.install_handlers(s.callback, activity=self.top) -- cgit v0.9.1