Changeset 72:d48789c4c484 for wokkel/test
- Timestamp:
- Jul 21, 2009, 8:00:12 PM (13 years ago)
- Branch:
- default
- Convert:
- svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@190
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/test/test_client.py
r61 r72 21 21 from wokkel import client 22 22 from wokkel.test.test_compat import BootstrapMixinTest 23 24 class XMPPClientTest(unittest.TestCase): 25 """ 26 Tests for L{client.XMPPClient}. 27 """ 28 29 def setUp(self): 30 self.client = client.XMPPClient(JID('user@example.org'), 'secret') 31 32 33 def test_jid(self): 34 """ 35 Make sure the JID we pass is stored on the client. 36 """ 37 self.assertEquals(JID('user@example.org'), self.client.jid) 38 39 40 def test_jidWhenInitialized(self): 41 """ 42 Make sure that upon login, the JID is updated from the authenticator. 43 """ 44 xs = self.client.factory.buildProtocol(None) 45 self.client.factory.authenticator.jid = JID('user@example.org/test') 46 xs.dispatch(xs, xmlstream.STREAM_AUTHD_EVENT) 47 self.assertEquals(JID('user@example.org/test'), self.client.jid) 48 49 23 50 24 51 class DeferredClientFactoryTest(BootstrapMixinTest):
Note: See TracChangeset
for help on using the changeset viewer.