Changeset 61:5a5840e066fb for wokkel/test/test_client.py
- Timestamp:
- Jun 12, 2009, 5:32:06 PM (13 years ago)
- Branch:
- default
- Convert:
- svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@173
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/test/test_client.py
r42 r61 13 13 from twisted.words.protocols.jabber.xmlstream import STREAM_AUTHD_EVENT 14 14 from twisted.words.protocols.jabber.xmlstream import INIT_FAILED_EVENT 15 16 try: 17 from twisted.words.protocols.jabber.xmlstream import XMPPHandler 18 except ImportError: 19 from wokkel.subprotocols import XMPPHandler 15 20 16 21 from wokkel import client … … 78 83 79 84 85 def test_addHandler(self): 86 """ 87 Test the addition of a protocol handler. 88 """ 89 handler = XMPPHandler() 90 handler.setHandlerParent(self.factory.streamManager) 91 self.assertIn(handler, self.factory.streamManager) 92 self.assertIdentical(self.factory.streamManager, handler.parent) 93 94 95 def test_removeHandler(self): 96 """ 97 Test removal of a protocol handler. 98 """ 99 handler = XMPPHandler() 100 handler.setHandlerParent(self.factory.streamManager) 101 handler.disownHandlerParent(self.factory.streamManager) 102 self.assertNotIn(handler, self.factory.streamManager) 103 self.assertIdentical(None, handler.parent) 104 105 80 106 81 107 class ClientCreatorTest(unittest.TestCase):
Note: See TracChangeset
for help on using the changeset viewer.