diff options
author | mike <michael.jmontcalm@gmail.com> | 2009-11-09 03:10:11 (GMT) |
---|---|---|
committer | mike <michael.jmontcalm@gmail.com> | 2009-11-09 03:10:11 (GMT) |
commit | 61edb0f742604cd3cc2dc9895cf679765b9b899e (patch) | |
tree | 76d882de81c88c970ff5c044db125409aee36cb9 /tests | |
parent | 80ebf5d2fc91e0e9359becdd0b344332063951ab (diff) | |
parent | 88013b2f9f93c3220812cd3b624db1423ac081ed (diff) |
Conflicts:
addons/gtkwidgeteventfilter.py
addons/readfile.py
addons/timerevent.py
tests/probetests.py
tests/run-tests.py
tutorius/TProbe.py
tutorius/bundler.py
tutorius/core.py
tutorius/creator.py
tutorius/dbustools.py
tutorius/engine.py
tutorius/filters.py
tutorius/properties.py
tutorius/service.py
Diffstat (limited to 'tests')
-rw-r--r-- | tests/enginetests.py | 30 | ||||
-rw-r--r-- | tests/translatortests.py | 6 |
2 files changed, 34 insertions, 2 deletions
diff --git a/tests/enginetests.py b/tests/enginetests.py new file mode 100644 index 0000000..60a68f4 --- /dev/null +++ b/tests/enginetests.py @@ -0,0 +1,30 @@ +# Copyright (C) 2009, Tutorius.org +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +import unittest + +import dbus + +session_bus = dbus.SessionBus() + +ENGINE_BUS_NAME = "org.tutorius.engine" + +LAUNCH_PATH = "/launch" +STOP_PATH = "/stop" +PAUSE_PATH = "/pause" + +class EngineInterfaceTests(unittest.TestCase): + pass diff --git a/tests/translatortests.py b/tests/translatortests.py index e71b795..3b5ca6f 100644 --- a/tests/translatortests.py +++ b/tests/translatortests.py @@ -21,6 +21,7 @@ import uuid from sugar.tutorius.translator import * from sugar.tutorius.properties import * from sugar.tutorius.tutorial import * +from sugar.tutorius.vault import Vault from sugar.tutorius import addon ############################################################################## @@ -97,8 +98,6 @@ class ResourceTranslatorTests(unittest.TestCase): self.translator = ResourceTranslator(self.prob_man, self.tutorial_id) - pass - def tearDown(self): Vault.deleteTutorial(self.tutorial_id) @@ -113,6 +112,8 @@ class ResourceTranslatorTests(unittest.TestCase): assert getattr(res_action, "resource").type == "file", "Resource was not converted to file" + assert res_action.resource.default == Vault.get_resource_path(self.tutorial_id, self.res_name), "Transformed resource path is not the same as the one given by the vault" + def test_recursive_translate(self): nested_action = NestedResource() @@ -127,3 +128,4 @@ class ResourceTranslatorTests(unittest.TestCase): for container in list_action.nested_list: assert getattr(container, "resource").type == "file", "Element of list was not converted properly" + |