From 61edb0f742604cd3cc2dc9895cf679765b9b899e Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 09 Nov 2009 03:10:11 +0000 Subject: Merge branch 'lp435984' of ../mainline 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 --- (limited to 'tests/translatortests.py') 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" + -- cgit v0.9.1