Add handle_presence_subscribed test

darcs-hash:20061130215636-86b55-55c02e41cd14be5b752f1a187ef3834abb632425.gz
This commit is contained in:
David Rousselie
2006-11-30 22:56:36 +01:00
parent 04fee565a7
commit 717e1543d3
2 changed files with 7 additions and 12 deletions

View File

@@ -1421,7 +1421,13 @@ class JCLComponent_TestCase(unittest.TestCase):
presence_sent = self.comp.stream.sent
self.assertEqual(len(presence_sent), 0)
def test_handle_presence_unsubscribe(self):
def test_handle_presence_subscribed(self):
self.comp.stream = MockStream()
self.comp.stream_class = MockStream
self.comp.handle_presence_subscribed(None)
self.assertEqual(len(self.comp.stream.sent), 0)
def test_handle_presence_unsubscribe_to_account(self):
self.comp.stream = MockStream()
self.comp.stream_class = MockStream
account.hub.threadConnection = connectionForURI('sqlite://' + DB_URL)