Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/storetests.py1
-rw-r--r--tutorius/store.py12
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/storetests.py b/tests/storetests.py
index f3d813c..0c36973 100644
--- a/tests/storetests.py
+++ b/tests/storetests.py
@@ -80,7 +80,6 @@ class StoreProxyLoginTest(unittest.TestCase):
if session_id is not None:
self.store.close_session()
-
@catch_unimplemented
def test_get_session_id(self):
diff --git a/tutorius/store.py b/tutorius/store.py
index d9ea3ea..2e55d71 100644
--- a/tutorius/store.py
+++ b/tutorius/store.py
@@ -323,12 +323,16 @@ class StoreProxy(object):
headers = { 'X-API-Auth' : self.api_auth_key }
response = self.conn.request_post(request_url, None, None, None, headers)
-
if self.helper.iserror(response):
return -1
return tutorial_store_id
+ if self.helper.iserror(response):
+ return False
+
+ return True
+
# Otherwise, we want to publish a new tutorial
if tutorial_info == None:
return False
@@ -349,7 +353,11 @@ class StoreProxy(object):
id = id_node.getAttribute('value')
return id
-
+
+ if self.helper.iserror(response):
+ return False
+
+ return True
def unpublish(self, tutorial_store_id):
"""