Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/coretests.py
diff options
context:
space:
mode:
authorVincent Vinet <vince.vinet@gmail.com>2009-12-04 05:06:49 (GMT)
committer Vincent Vinet <vince.vinet@gmail.com>2009-12-06 04:06:40 (GMT)
commit8acd9095e8f32ee20a6c4cd105d12a133fa9f346 (patch)
treeec24b60f26bde5eaf92c8bb8495deb733ab2cb69 /tests/coretests.py
parent3550e7a3feac8726e4747457e14932e6010b397b (diff)
Add Event Sources:event_sources
- Add source property in Action and EventFilter - Change TPropContainer contructor to accept keyword arguments and set properties that were given - Change every single TPropContainer subclass constructor to accept kwargs and pass them on to super init - Add a "null" option for TStringProperty Use Event Sources: - Make the probe require a source property to install or subscribe - Have ProbeProxy install and subscribe return a prefixed address - Make update, uninstall and unsubsribe extract the prefix from the address - Have the TutorialRunner set a source on actions/events before installing/subscribing instead of setting current activity on ProbeManager Test Event Sources: - Change the tests according to the new constructors and behaviors
Diffstat (limited to 'tests/coretests.py')
-rw-r--r--tests/coretests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/coretests.py b/tests/coretests.py
index b9e04e5..1cc5431 100644
--- a/tests/coretests.py
+++ b/tests/coretests.py
@@ -242,7 +242,7 @@ class StateTest(unittest.TestCase):
act1 = addon.create("BubbleMessage", message="Hi", position=[132,450])
act2 = addon.create("BubbleMessage", message="Hi", position=[132,450])
- event1 = addon.create("GtkWidgetEventFilter", "0.0.0.1.1.2.3.1", "clicked")
+ event1 = addon.create("GtkWidgetEventFilter", object_id="0.0.0.1.1.2.3.1", event_name="clicked")
act3 = addon.create("DialogMessage", message="Hello again.", position=[200, 400])
@@ -276,19 +276,19 @@ class StateTest(unittest.TestCase):
st2.name = "Identical"
st3 = deepcopy(st1)
- st3.add_action(addon.create("BubbleMessage", "Hi!", [128,264]))
+ st3.add_action(addon.create("BubbleMessage", message="Hi!", position=[128,264]))
assert not (st1 == st3), "States having a different number of actions should be different"
st4 = deepcopy(st1)
- st4.add_event_filter(addon.create("GtkWidgetEventFilter", "0.0.1.1.2.2.3", "clicked"), "next_state")
+ st4.add_event_filter(addon.create("GtkWidgetEventFilter", object_id="0.0.1.1.2.2.3", event_name="clicked"), "next_state")
assert not (st1 == st4), "States having a different number of events should be different"
st5 = deepcopy(st1)
st5._event_filters = []
- st5.add_event_filter(addon.create("GtkWidgetEventFilter", "0.1.2.3.4.1.2", "pressed"), "other_state")
+ st5.add_event_filter(addon.create("GtkWidgetEventFilter", object_id="0.1.2.3.4.1.2", event_name="pressed"), "other_state")
assert not (st1 == st5), "States having the same number of event filters" \
+ " but those being different should be different"
@@ -502,7 +502,7 @@ class FSMTest(unittest.TestCase):
st2 = State("Other State")
st3 = State("Final State")
- st1.add_action(addon.create("BubbleMessage", "Hi!", [132,312]))
+ st1.add_action(addon.create("BubbleMessage", message="Hi!", position=[132,312]))
fsm.add_state(st1)
fsm.add_state(st2)
@@ -534,7 +534,7 @@ class FSMTest(unittest.TestCase):
fsm3 = FiniteStateMachine("Identity test")
- act3 = addon.create("BubbleMessage", "Hi!", [123,312])
+ act3 = addon.create("BubbleMessage", message="Hi!", position=[123,312])
fsm3.add_action(act3)
assert not(fsm3 == fsm), \