Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/translatortests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/translatortests.py')
-rw-r--r--tests/translatortests.py6
1 files changed, 4 insertions, 2 deletions
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"
+