From 794e7ebdcd6ab80f0cba235c46fba46b8c5c3cef Mon Sep 17 00:00:00 2001 From: Simon Poirier Date: Fri, 30 Oct 2009 20:28:15 +0000 Subject: test utils and NotImplemented tests cleaning --- (limited to 'tests/storetests.py') diff --git a/tests/storetests.py b/tests/storetests.py index da20c00..0d1d9af 100644 --- a/tests/storetests.py +++ b/tests/storetests.py @@ -15,6 +15,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import unittest +from tests.utils import skip, catch_unimplemented from sugar.tutorius.store import * @@ -28,32 +29,39 @@ class StoreProxyTest(unittest.TestCase): def tearDown(self): pass + @catch_unimplemented def test_get_categories(self): categories = self.store.get_categories() assert isinstance(categories, list), "categories should be a list" + @catch_unimplemented def test_get_tutorials(self): self.store.get_tutorials() + @catch_unimplemented def test_get_tutorial_collection(self): collection_list = self.store.get_tutorial_collection('top5_rating') assert isinstance(collection_list, list), "get_tutorial_collection should return a list" + @catch_unimplemented def test_get_latest_version(self): version_dict = self.store.get_latest_version([]) assert isinstance(version_dict, dict) + @catch_unimplemented def test_download_tutorial(self): tutorial = self.store.download_tutorial(g_tutorial_id) assert tutorial is not None + @catch_unimplemented def test_login(self): assert self.store.login("unknown_user", "random_password") + @catch_unimplemented def test_register_new_user(self): user_info = { 'name' : "Albert", @@ -66,32 +74,39 @@ class StoreProxyTest(unittest.TestCase): class StoreProxyLoginTest(unittest.TestCase): + @catch_unimplemented def setUp(self): self.store = StoreProxy() self.store.login("unknown_user", "random_password") + @catch_unimplemented def tearDown(self): session_id = self.store.get_session_id() if session_id is not None: self.store.close_session() + @catch_unimplemented def test_close_session(self): assert self.store.close_session() + @catch_unimplemented def test_get_session_id(self): session_id = self.store.get_session_id() assert session_id is not None + @catch_unimplemented def test_rate(self): assert self.store.rate(5, g_tutorial_id) + @catch_unimplemented def test_publish(self): # TODO : We need to send in a real tutorial loaded from # the Vault assert self.store.publish(['This should be a real tutorial...']) + @catch_unimplemented def test_unpublish(self): # TODO : We need to send in a real tutorial loaded from # the Vault @@ -99,6 +114,7 @@ class StoreProxyLoginTest(unittest.TestCase): assert self.store.unpublish(g_tutorial_id) + @catch_unimplemented def test_update_published_tutorial(self): # TODO : Run these tests with files from the Vault self.store.publish([g_tutorial_id, 'Fake tutorial']) -- cgit v0.9.1