Mercurial > libervia-pubsub
comparison sat_pubsub/test/test_storage.py @ 234:51af2ed8bd50
replaced idavoll imports by sat_pubsub imports
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 17 May 2012 01:53:12 +0200 |
parents | 564ae55219e1 |
children | 64f780413b82 |
comparison
equal
deleted
inserted
replaced
233:564ae55219e1 | 234:51af2ed8bd50 |
---|---|
60 from twisted.trial import unittest | 60 from twisted.trial import unittest |
61 from twisted.words.protocols.jabber import jid | 61 from twisted.words.protocols.jabber import jid |
62 from twisted.internet import defer | 62 from twisted.internet import defer |
63 from twisted.words.xish import domish | 63 from twisted.words.xish import domish |
64 | 64 |
65 from idavoll import error, iidavoll | 65 from sat_pubsub import error, iidavoll |
66 | 66 |
67 OWNER = jid.JID('owner@example.com/Work') | 67 OWNER = jid.JID('owner@example.com/Work') |
68 SUBSCRIBER = jid.JID('subscriber@example.com/Home') | 68 SUBSCRIBER = jid.JID('subscriber@example.com/Home') |
69 SUBSCRIBER_NEW = jid.JID('new@example.com/Home') | 69 SUBSCRIBER_NEW = jid.JID('new@example.com/Home') |
70 SUBSCRIBER_TO_BE_DELETED = jid.JID('to_be_deleted@example.com/Home') | 70 SUBSCRIBER_TO_BE_DELETED = jid.JID('to_be_deleted@example.com/Home') |
482 | 482 |
483 | 483 |
484 class MemoryStorageStorageTestCase(unittest.TestCase, StorageTests): | 484 class MemoryStorageStorageTestCase(unittest.TestCase, StorageTests): |
485 | 485 |
486 def setUp(self): | 486 def setUp(self): |
487 from idavoll.memory_storage import Storage, PublishedItem, LeafNode | 487 from sat_pubsub.memory_storage import Storage, PublishedItem, LeafNode |
488 from idavoll.memory_storage import Subscription | 488 from sat_pubsub.memory_storage import Subscription |
489 | 489 |
490 defaultConfig = Storage.defaultConfig['leaf'] | 490 defaultConfig = Storage.defaultConfig['leaf'] |
491 | 491 |
492 self.s = Storage() | 492 self.s = Storage() |
493 self.s._nodes['pre-existing'] = \ | 493 self.s._nodes['pre-existing'] = \ |
526 class PgsqlStorageStorageTestCase(unittest.TestCase, StorageTests): | 526 class PgsqlStorageStorageTestCase(unittest.TestCase, StorageTests): |
527 | 527 |
528 dbpool = None | 528 dbpool = None |
529 | 529 |
530 def setUp(self): | 530 def setUp(self): |
531 from idavoll.pgsql_storage import Storage | 531 from sat_pubsub.pgsql_storage import Storage |
532 from twisted.enterprise import adbapi | 532 from twisted.enterprise import adbapi |
533 if self.dbpool is None: | 533 if self.dbpool is None: |
534 self.__class__.dbpool = adbapi.ConnectionPool('psycopg2', | 534 self.__class__.dbpool = adbapi.ConnectionPool('psycopg2', |
535 database='pubsub_test', | 535 database='pubsub_test', |
536 cp_reconnect=True, | 536 cp_reconnect=True, |