Mercurial > libervia-pubsub
diff idavoll/test/test_storage.py @ 171:bc269696ef42
Reply with the correct error condition on subscription when not subscribed.
Author: ralphm.
Fixes #7.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Thu, 03 Jan 2008 13:10:25 +0000 |
parents | ef22e4150caa |
children | e404775b12df |
line wrap: on
line diff
--- a/idavoll/test/test_storage.py Tue Oct 09 10:20:25 2007 +0000 +++ b/idavoll/test/test_storage.py Thu Jan 03 13:10:25 2008 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2003-2007 Ralph Meijer +# Copyright (c) 2003-2008 Ralph Meijer # See LICENSE for details. """ @@ -39,6 +39,7 @@ object = object.decode('utf-8') return object + class StorageTests: def _assignTestNode(self, node): @@ -203,7 +204,7 @@ def testRemoveNonExistingSubscription(self): d = self.node.remove_subscription(OWNER) - self.assertFailure(d, error.SubscriptionNotFound) + self.assertFailure(d, error.NotSubscribed) return d def testGetSubscribers(self): @@ -338,6 +339,7 @@ d.addCallback(cb2) return d + class MemoryStorageStorageTestCase(unittest.TestCase, StorageTests): def setUp(self): @@ -371,6 +373,7 @@ return StorageTests.setUp(self) + class PgsqlStorageStorageTestCase(unittest.TestCase, StorageTests): def _callSuperSetUp(self, void): return StorageTests.setUp(self)