diff options
author | mathieui <mathieui@mathieui.net> | 2021-02-14 12:06:05 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-02-26 00:08:56 +0100 |
commit | 13de36baa1ad0b57fd674f514203d3ea34ee5c7d (patch) | |
tree | 0476e25377da6af9d73c0882115a21203559634d /tests | |
parent | 7772e26a8c766c2606b40f4260e406cd3ed56435 (diff) | |
download | slixmpp-13de36baa1ad0b57fd674f514203d3ea34ee5c7d.tar.gz slixmpp-13de36baa1ad0b57fd674f514203d3ea34ee5c7d.tar.bz2 slixmpp-13de36baa1ad0b57fd674f514203d3ea34ee5c7d.tar.xz slixmpp-13de36baa1ad0b57fd674f514203d3ea34ee5c7d.zip |
XEP-0030: API changes
- ``supports``, ``has_identity``, ``get_info``, ``get_items`` are now coroutines
- ``set_info````set_items``, ``del_items``, ``add_item``, ``add_identity``,
``del_identity``, ``set_identities``, ``del_identities``, ``add_feature``,
``del_feature``, ``set_feature``, ``set_features``, ``del_features``
now return a Future
also fix has_identity and supports which have been broken in forever
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_stream_xep_0030.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_stream_xep_0030.py b/tests/test_stream_xep_0030.py index d1ad9087..8cba8280 100644 --- a/tests/test_stream_xep_0030.py +++ b/tests/test_stream_xep_0030.py @@ -1,5 +1,5 @@ +import asyncio import time -import threading import unittest from slixmpp.test import SlixTest @@ -288,7 +288,9 @@ class TestStreamDisco(SlixTest): self.xmpp.add_event_handler('disco_info', handle_disco_info) - self.xmpp['xep_0030'].get_info('user@localhost', 'foo') + + self.xmpp.wrap(self.xmpp['xep_0030'].get_info('user@localhost', 'foo')) + self.wait_() self.send(""" <iq type="get" to="user@localhost" id="1"> @@ -483,7 +485,8 @@ class TestStreamDisco(SlixTest): self.xmpp.add_event_handler('disco_items', handle_disco_items) - self.xmpp['xep_0030'].get_items('user@localhost', 'foo') + self.xmpp.wrap(self.xmpp['xep_0030'].get_items('user@localhost', 'foo')) + self.wait_() self.send(""" <iq type="get" to="user@localhost" id="1"> |