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.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/vaulttests.py b/tests/vaulttests.py
index 48869a7..ca61225 100644
--- a/tests/vaulttests.py
+++ b/tests/vaulttests.py
@@ -270,20 +270,19 @@ class VaultInterfaceTest(unittest.TestCase):
assert os.path.isfile(image_path), 'cannot find the test image file'
# Create and save a tutorial
- tutorial = Tutorial('test', self.fsm)
- Vault.saveTutorial(tutorial, self.test_metadata_dict)
+ Vault.saveTutorial(self.fsm, self.test_metadata_dict)
bundler = TutorialBundler(self.save_test_guid)
tuto_path = bundler.get_tutorial_path(self.save_test_guid)
# add the ressource to the tutorial
- ressource_id = Vault.add_ressource(self.save_test_guid, image_path)
+ 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'
# Check if get_ressource_path Vault interface function is working
- vault_path = Vault.get_ressource_path(self.save_test_guid, ressource_id)
+ vault_path = Vault.get_resource_path(self.save_test_guid, ressource_id)
assert os.path.isfile(vault_path), 'path returned is not a file'
basename, extension = os.path.splitext(vault_path)
@@ -291,14 +290,10 @@ class VaultInterfaceTest(unittest.TestCase):
# Delete the ressource
- Vault.delete_ressource(self.save_test_guid, ressource_id)
+ Vault.delete_resource(self.save_test_guid, ressource_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.'
-
-
-
-
def tearDown(self):
folder = os.path.join(os.getenv("HOME"),".sugar", 'default', 'tutorius', 'data');