diff options
author | Ben Tremblay <benoit.tremblay1@gmail.com> | 2009-11-06 16:22:37 (GMT) |
---|---|---|
committer | Ben Tremblay <benoit.tremblay1@gmail.com> | 2009-11-06 16:22:37 (GMT) |
commit | 9f1259f5e243f33d88883c447e575e8b2d8fb520 (patch) | |
tree | 6117b1406c892623322b6873dbe696e149094201 | |
parent | 4b292b46acb6ecf08fbfe980cefaaeba51199aab (diff) | |
parent | 86511b28a7949a548213fb7d1cbbb6126208965e (diff) |
publish now returns an id and tests updated
-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): """ |