Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/tests
diff options
context:
space:
mode:
authorSimon Poirier <simpoir@gmail.com>2009-05-18 20:27:41 (GMT)
committer Simon Poirier <simpoir@gmail.com>2009-06-01 04:50:00 (GMT)
commitf347ec202fe5b4404fa380694d7fe3d3d070ae7b (patch)
tree89f10094b90489fc43b8ec209b16d94ff2405147 /src/sugar/tutorius/tests
parent6fa568daae3291c7a876cd903f04079a12945dcb (diff)
fixed major missing parts in bundler
integrated bundler to creator tutorial loading still is unusable (fiters don't seem to load)
Diffstat (limited to 'src/sugar/tutorius/tests')
-rw-r--r--src/sugar/tutorius/tests/linear_creatortests.py6
-rw-r--r--src/sugar/tutorius/tests/serializertests.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/sugar/tutorius/tests/linear_creatortests.py b/src/sugar/tutorius/tests/linear_creatortests.py
index f9ffbe7..dcded57 100644
--- a/src/sugar/tutorius/tests/linear_creatortests.py
+++ b/src/sugar/tutorius/tests/linear_creatortests.py
@@ -50,13 +50,13 @@ class CreatorTests(unittest.TestCase):
assert len(init_state.get_action_list()) == 2, "Creator did not insert all the actions"
- assert init_state.get_event_filter_list()[0].get_next_state() == "State1"
+ assert init_state.get_event_filter_list()[0].get_next_state() == "State 1" , "expected next state to be 'State 1' but got %s" % init_state.get_event_filter_list()[0].get_next_state()
- state1 = fsm.get_state_by_name("State1")
+ state1 = fsm.get_state_by_name("State 1")
assert len(state1.get_action_list()) == 1, "Creator did not insert all the actions"
- assert state1.get_event_filter_list()[0].get_next_state() == "State2"
+ assert state1.get_event_filter_list()[0].get_next_state() == "State 2"
# Make sure we have the final state and that it's empty
state2 = fsm.get_state_by_name("State2")
diff --git a/src/sugar/tutorius/tests/serializertests.py b/src/sugar/tutorius/tests/serializertests.py
index bc29601..097e570 100644
--- a/src/sugar/tutorius/tests/serializertests.py
+++ b/src/sugar/tutorius/tests/serializertests.py
@@ -70,6 +70,7 @@ class XMLSerializerTest(unittest.TestCase):
self.testpath = "/tmp/testdata/"
os.environ["SUGAR_BUNDLE_PATH"] = self.testpath
os.environ["SUGAR_PREFIX"] = self.testpath
+ os.environ["SUGAR_PROFILE"] = 'test'
## os.mkdir(sugar.tutorius.bundler._get_store_root())
# Create the sample FSM
@@ -103,6 +104,7 @@ class XMLSerializerTest(unittest.TestCase):
"""
if self.remove == True:
os.remove(os.path.join(sugar.tutorius.bundler._get_store_root(), str(self.uuid)) + "/fsm.xml")
+ shutil.rmtree(os.path.join(os.getenv("HOME"),".sugar",os.getenv("SUGAR_PROFILE")))
if os.path.isdir(self.testpath):
shutil.rmtree(self.testpath)