From 6fa568daae3291c7a876cd903f04079a12945dcb Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 05 May 2009 05:44:27 +0000 Subject: Merge branch 'mike' Conflicts: source/external/source/sugar-toolkit/src/sugar/tutorius/actions.py source/external/source/sugar-toolkit/src/sugar/tutorius/tests/actiontests.py source/external/source/sugar-toolkit/src/sugar/tutorius/tests/run-tests.py --- (limited to 'src/sugar/tutorius/tests/actiontests.py') diff --git a/src/sugar/tutorius/tests/actiontests.py b/src/sugar/tutorius/tests/actiontests.py index bce753e..d244547 100644 --- a/src/sugar/tutorius/tests/actiontests.py +++ b/src/sugar/tutorius/tests/actiontests.py @@ -52,6 +52,28 @@ class PropsTest(unittest.TestCase): for prop_name in act.get_properties(): assert act.properties[prop_name].value == test_props[prop_name], "Wrong initial value for property %s : %s"%(prop_name,str(act.properties[prop_name])) + +class DialogMessageTest(unittest.TestCase): + def setUp(self): + self.dial = DialogMessage("Message text", [200, 300]) + + def test_properties(self): + assert self.dial.message.value == "Message text", "Wrong start value for the message" + + assert self.dial.position.value == [200, 300], "Wrong start value for the position" + +class BubbleMessageTest(unittest.TestCase): + def setUp(self): + self.bubble = BubbleMessage(message="Message text", pos=[200, 300], tailpos=[-15, -25]) + + def test_properties(self): + props = self.bubble.get_properties() + + assert "message" in props, 'No message property of BubbleMessage' + + assert "position" in props, 'No position property in BubbleMessage' + + assert "tail_pos" in props, 'No tail position property in BubbleMessage' class CountAction(Action): -- cgit v0.9.1