diff options
author | Lance Stout <lancestout@gmail.com> | 2012-03-10 12:48:35 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-03-10 12:48:35 -0800 |
commit | 91155444c0f66ed3172ff8fc669a5eebe514e9cc (patch) | |
tree | 0444b5ba230a9aceb28fd5977b45ac63218c60d4 /tests | |
parent | 7f71ac7e0a43ca7a7b4347fe8f1bab0cb76e9741 (diff) | |
download | slixmpp-91155444c0f66ed3172ff8fc669a5eebe514e9cc.tar.gz slixmpp-91155444c0f66ed3172ff8fc669a5eebe514e9cc.tar.bz2 slixmpp-91155444c0f66ed3172ff8fc669a5eebe514e9cc.tar.xz slixmpp-91155444c0f66ed3172ff8fc669a5eebe514e9cc.zip |
Resolve plugin dependency chains with XEP-0115.
The post_init() system can only reliably handle a single layer
of dependencies between plugins, but PEP plugins with XEP-0115
exceed that limit and plugins can be post_init'ed out of order. To
resolve this, we will special case XEP-0115 to be post_init'ed
first until the new plugin system with dependency tracking is
stable.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_stream_presence.py | 12 | ||||
-rw-r--r-- | tests/test_stream_roster.py | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/tests/test_stream_presence.py b/tests/test_stream_presence.py index 63ccb043..4f2ede16 100644 --- a/tests/test_stream_presence.py +++ b/tests/test_stream_presence.py @@ -7,6 +7,9 @@ class TestStreamPresence(SleekTest): Test handling roster updates. """ + def setUp(self): + self.stream_start(jid='tester@localhost', plugins=[]) + def tearDown(self): self.stream_close() @@ -25,7 +28,6 @@ class TestStreamPresence(SleekTest): # The presence_unavailable event should be triggered. events.add('unavailable') - self.stream_start() self.xmpp.add_event_handler('got_offline', got_offline) self.xmpp.add_event_handler('presence_unavailable', unavailable) @@ -48,7 +50,6 @@ class TestStreamPresence(SleekTest): def got_offline(presence): events.append('got_offline') - self.stream_start() self.xmpp.add_event_handler('got_offline', got_offline) # Setup roster. Use a 'set' instead of 'result' so we @@ -98,7 +99,6 @@ class TestStreamPresence(SleekTest): def got_online(p): events.add('got_online') - self.stream_start() self.xmpp.add_event_handler('presence_available', presence_available) self.xmpp.add_event_handler('got_online', got_online) @@ -128,7 +128,6 @@ class TestStreamPresence(SleekTest): def changed_subscription(p): events.add('changed_subscription') - self.stream_start(jid='tester@localhost') self.xmpp.add_event_handler('changed_subscription', changed_subscription) @@ -175,8 +174,6 @@ class TestStreamPresence(SleekTest): def changed_subscription(p): events.add('changed_subscription') - self.stream_start(jid='tester@localhost') - self.xmpp.add_event_handler('changed_subscription', changed_subscription) self.xmpp.add_event_handler('presence_subscribe', @@ -205,8 +202,6 @@ class TestStreamPresence(SleekTest): events = [] - self.stream_start() - ptypes = ['available', 'away', 'dnd', 'xa', 'chat', 'unavailable', 'subscribe', 'subscribed', 'unsubscribe', 'unsubscribed'] @@ -254,7 +249,6 @@ class TestStreamPresence(SleekTest): def test_changed_status(self): """Test that the changed_status event is handled properly.""" events = [] - self.stream_start() def changed_status(presence): events.append(presence['type']) diff --git a/tests/test_stream_roster.py b/tests/test_stream_roster.py index 535a0080..2d0da173 100644 --- a/tests/test_stream_roster.py +++ b/tests/test_stream_roster.py @@ -226,7 +226,7 @@ class TestStreamRoster(SleekTest): def testRosterUnicode(self): """Test that JIDs with Unicode values are handled properly.""" - self.stream_start() + self.stream_start(plugins=[]) self.recv(""" <iq to="tester@localhost" type="set" id="1"> <query xmlns="jabber:iq:roster"> @@ -267,7 +267,7 @@ class TestStreamRoster(SleekTest): def testSendLastPresence(self): """Test that sending the last presence works.""" - self.stream_start() + self.stream_start(plugins=[]) self.xmpp.send_presence(pshow='dnd') self.xmpp.auto_authorize = True self.xmpp.auto_subscribe = True |