diff options
author | Nathan Fritz <fritzy@netflint.net> | 2011-08-12 16:35:15 -0700 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2011-08-12 16:35:15 -0700 |
commit | bd8c110f00a41917839a0578de68b80c39ee6e16 (patch) | |
tree | cc44410ba6e6efe7cfcf1decc8f1b1d8b2692aa7 /tests/test_stream_roster.py | |
parent | 0050c5112428939346397a4d2edfeb313c0fd497 (diff) | |
parent | d7fe724145c2e01d1028dab773fb49414c6856dd (diff) | |
download | slixmpp-bd8c110f00a41917839a0578de68b80c39ee6e16.tar.gz slixmpp-bd8c110f00a41917839a0578de68b80c39ee6e16.tar.bz2 slixmpp-bd8c110f00a41917839a0578de68b80c39ee6e16.tar.xz slixmpp-bd8c110f00a41917839a0578de68b80c39ee6e16.zip |
Merge branch 'exceptions' into develop
Diffstat (limited to 'tests/test_stream_roster.py')
-rw-r--r-- | tests/test_stream_roster.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/test_stream_roster.py b/tests/test_stream_roster.py index e1aa1766..95163744 100644 --- a/tests/test_stream_roster.py +++ b/tests/test_stream_roster.py @@ -111,19 +111,12 @@ class TestStreamRoster(SleekTest): def testRosterTimeout(self): """Test handling a timed out roster request.""" self.stream_start() - events = [] - - def roster_timeout(event): - events.append('roster_timeout') - - self.xmpp.add_event_handler('roster_timeout', roster_timeout) - self.xmpp.get_roster(timeout=0) - # Give the event queue time to process. - time.sleep(.1) + def do_test(): + self.xmpp.get_roster(timeout=0) + time.sleep(.1) - self.failUnless(events == ['roster_timeout'], - "Roster timeout event not triggered: %s." % events) + self.assertRaises(IqTimeout, do_test) def testRosterCallback(self): """Test handling a roster request callback.""" |