Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/tests/linear_creatortests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sugar/tutorius/tests/linear_creatortests.py')
-rw-r--r--src/sugar/tutorius/tests/linear_creatortests.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/sugar/tutorius/tests/linear_creatortests.py b/src/sugar/tutorius/tests/linear_creatortests.py
index 3bc06f9..f9ffbe7 100644
--- a/src/sugar/tutorius/tests/linear_creatortests.py
+++ b/src/sugar/tutorius/tests/linear_creatortests.py
@@ -19,8 +19,8 @@ from sugar.tutorius.core import *
from sugar.tutorius.actions import *
from sugar.tutorius.filters import *
from sugar.tutorius.linear_creator import *
-from coretests import TriggerEventFilter, CountAction
-
+from coretests import TriggerEventFilter
+from actiontests import CountAction
import unittest
class CreatorTests(unittest.TestCase):
@@ -64,6 +64,16 @@ class CreatorTests(unittest.TestCase):
assert len(state2.get_action_list()) == 0, "Creator inserted extra actions on wrong state"
assert len(state2.get_event_filter_list()) == 0, "Creator assigner events to the final state"
+
+ creator.action(CountAction())
+
+ fsm = creator.generate_fsm()
+
+ state2 = fsm.get_state_by_name("State2")
+
+ assert len(state2.get_action_list()) == 1, "Creator did not add the action"
+
+ assert len(state2.get_event_filter_list()) == 0, "Creator assigner events to the final state"
if __name__ == '__main__':
- unittest.main() \ No newline at end of file
+ unittest.main()