Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/vaulttests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vaulttests.py')
-rw-r--r--tests/vaulttests.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/vaulttests.py b/tests/vaulttests.py
index ca61225..0af2d65 100644
--- a/tests/vaulttests.py
+++ b/tests/vaulttests.py
@@ -260,10 +260,10 @@ class VaultInterfaceTest(unittest.TestCase):
# (so we can specifiy that we want only the metadata for this particular tutorial
- def test_add_delete_get_path_ressource(self):
+ def test_add_delete_get_path_resource(self):
"""
- This test verify that the vault interface function add_ressource succesfully add ressource in the vault
- and return the new ressource id. It also test the deletion of the ressource.
+ This test verify that the vault interface function add_resource succesfully add resource in the vault
+ and return the new resource id. It also test the deletion of the resource.
"""
# Path of an image file in the test folder
image_path = os.path.join(os.getcwd(), 'tests', 'ressources', 'icon.svg')
@@ -279,22 +279,23 @@ class VaultInterfaceTest(unittest.TestCase):
ressource_id = Vault.add_resource(self.save_test_guid, image_path)
# Check that the image file is now in the vault
- assert os.path.isfile(os.path.join(tuto_path, 'ressources', ressource_id)), 'image file not found in vault'
+ assert os.path.isfile(os.path.join(tuto_path, 'resources', resource_id)), 'image file not found in vault'
- # Check if get_ressource_path Vault interface function is working
- vault_path = Vault.get_resource_path(self.save_test_guid, ressource_id)
+ # Check if get_resource_path Vault interface function is working
+ vault_path = Vault.get_resource_path(self.save_test_guid, resource_id)
assert os.path.isfile(vault_path), 'path returned is not a file'
basename, extension = os.path.splitext(vault_path)
assert extension == '.svg', 'wrong file path have been returned'
-
- # Delete the ressource
- Vault.delete_resource(self.save_test_guid, ressource_id)
+ # Delete the resource
+ Vault.delete_resource(self.save_test_guid, resource_id)
- # Check that the ressource is not in the vault anymore
- assert os.path.isfile(os.path.join(tuto_path, 'ressources', ressource_id)) == False, 'image file found in vault when it should have been deleted.'
-
+ # Check that the resource is not in the vault anymore
+ assert os.path.isfile(os.path.join(tuto_path, 'resources', resource_id)) == False, 'image file found in vault when it should have been deleted.'
+
+
+
def tearDown(self):
folder = os.path.join(os.getenv("HOME"),".sugar", 'default', 'tutorius', 'data');
for file in os.listdir(folder):
@@ -445,7 +446,7 @@ class TutorialBundlerTests(unittest.TestCase):
This module contains all the tests for the storage mecanisms for tutorials
This mean testing saving and loading tutorial, .ini file management and
- adding ressources to tutorial
+ adding resources to tutorial
"""
def setUp(self):