diff options
-rw-r--r-- | tests/storetests.py | 1 | ||||
-rw-r--r-- | tutorius/store.py | 12 |
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): """ |