Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/actiontests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/actiontests.py')
-rw-r--r--tests/actiontests.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/actiontests.py b/tests/actiontests.py
index 7b8d1cb..80a10f8 100644
--- a/tests/actiontests.py
+++ b/tests/actiontests.py
@@ -50,14 +50,14 @@ class PropsTest(unittest.TestCase):
def test_get_properties(self):
act = PropertyAction(8)
- assert act.get_properties() == test_props.keys(), "Action does not contain property 'a'"
+ assert set(act.get_properties()).issuperset(test_props.keys()), "Action properties should contain at least those we specified"
- for prop_name in act.get_properties():
+ for prop_name in test_props.keys():
assert getattr(act, prop_name) == test_props[prop_name], "Wrong initial value for property %s : %s"%(prop_name,str(getattr(act, prop_name)))
class DialogMessageTest(unittest.TestCase):
def setUp(self):
- self.dial = addon.create('DialogMessage', "Message text", [200, 300])
+ self.dial = addon.create('DialogMessage', message="Message text", position=[200, 300])
def test_properties(self):
assert self.dial.message == "Message text", "Wrong start value for the message"
@@ -116,7 +116,7 @@ class OnceWrapperTests(unittest.TestCase):
CountAction
"""
act = CountAction()
- wrap = addon.create('OnceWrapper', act)
+ wrap = addon.create('OnceWrapper', action=act)
assert act.do_count == 0, "do() should not have been called in __init__()"
assert act.undo_count == 0, "undo() should not have been called in __init__()"
@@ -162,7 +162,7 @@ class ChainActionTest(unittest.TestCase):
first = ChainTester(witness)
second = ChainTester(witness)
- c = addon.create('ChainAction', [first, second])
+ c = addon.create('ChainAction', actions=[first, second])
assert witness == [], "Actions should not be triggered on init"""
c.do()
@@ -195,7 +195,7 @@ class DisableWidgetActionTests(unittest.TestCase):
assert btn.props.sensitive is True, "Callback should have been called"
- act = addon.create('DisableWidgetAction', "0")
+ act = addon.create('DisableWidgetAction', target="0")
assert btn.props.sensitive is True, "Callback should have been called again"
act.do()
assert btn.props.sensitive is False, "Callback should not have been called again"
@@ -285,7 +285,7 @@ class TypeTextActionTests(unittest.TestCase):
test_text = "This is text"
- action = addon.create('TypeTextAction', "0.0", test_text)
+ action = addon.create('TypeTextAction', widgetUAM="0.0", text=test_text)
assert widget == ObjectStore().activity.get_children()[0],\
"The clickable widget isn't reachable from the object store \
@@ -309,7 +309,7 @@ class TypeTextActionTests(unittest.TestCase):
test_text = "This is text"
- action = addon.create('TypeTextAction', "0.0", test_text)
+ action = addon.create('TypeTextAction', widgetUAM="0.0", text=test_text)
assert widget == ObjectStore().activity.get_children()[0],\
"The clickable widget isn't reachable from the object store \
@@ -330,7 +330,7 @@ class ClickActionTests(unittest.TestCase):
activity.add_child(widget)
ObjectStore().activity = activity
- action = addon.create('ClickAction', "0.0")
+ action = addon.create('ClickAction', widget="0.0")
assert widget == ObjectStore().activity.get_children()[0],\
"The clickable widget isn't reachable from the object store \
@@ -350,7 +350,7 @@ class ClickActionTests(unittest.TestCase):
activity.add_child(widget)
ObjectStore().activity = activity
- action = addon.create('ClickAction', "0.0")
+ action = addon.create('ClickAction', widget="0.0")
assert widget == ObjectStore().activity.get_children()[0],\
"The clickable widget isn't reachable from the object store \