diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-06 16:34:52 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-12-06 17:00:47 +0100 |
commit | cd4c9f82fc8d17726baa4b4a69c54151fb181f40 (patch) | |
tree | d47b5d13b0d79f6526661bf23caebbef9c57d136 /tests | |
parent | 05749c49690c00f2b1794212b2fb9281b6956a89 (diff) | |
download | slixmpp-cd4c9f82fc8d17726baa4b4a69c54151fb181f40.tar.gz slixmpp-cd4c9f82fc8d17726baa4b4a69c54151fb181f40.tar.bz2 slixmpp-cd4c9f82fc8d17726baa4b4a69c54151fb181f40.tar.xz slixmpp-cd4c9f82fc8d17726baa4b4a69c54151fb181f40.zip |
Remove OrderedDict usage
We now support only Python 3.7+, this means we can rely on dict being
ordered by order of insertion, and thus no need to use OrderedDict from
collections.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_stanza_element.py | 3 | ||||
-rw-r--r-- | tests/test_stanza_xep_0004.py | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_stanza_element.py b/tests/test_stanza_element.py index 2090f05a..8ebc9b23 100644 --- a/tests/test_stanza_element.py +++ b/tests/test_stanza_element.py @@ -1,7 +1,6 @@ import unittest from slixmpp.test import SlixTest from slixmpp.xmlstream.stanzabase import ElementBase, register_stanza_plugin, ET -from collections import OrderedDict class TestElementBase(SlixTest): @@ -1221,7 +1220,7 @@ class TestElementBase(SlixTest): sub_interfaces = interfaces lang_interfaces = interfaces - data = OrderedDict() + data = {} data['en'] = 'hi' data['fr'] = 'bonjour' data['no'] = 'hej' diff --git a/tests/test_stanza_xep_0004.py b/tests/test_stanza_xep_0004.py index 7b01b575..f8ef7a4c 100644 --- a/tests/test_stanza_xep_0004.py +++ b/tests/test_stanza_xep_0004.py @@ -1,7 +1,6 @@ import unittest from slixmpp import Message from slixmpp.test import SlixTest -from collections import OrderedDict import slixmpp.plugins.xep_0004 as xep_0004 from slixmpp.xmlstream import register_stanza_plugin @@ -52,7 +51,7 @@ class TestDataForms(SlixTest): </message> """) - fields = OrderedDict() + fields = {} fields['f1'] = {'type': 'text-single', 'label': 'Username', 'required': True} @@ -125,7 +124,7 @@ class TestDataForms(SlixTest): msg = self.Message() form = msg['form'] - fields = OrderedDict() + fields = {} fields['f1'] = {'type': 'text-single', 'label': 'Username', 'required': True} @@ -173,7 +172,7 @@ class TestDataForms(SlixTest): msg = self.Message() form = msg['form'] - fields = OrderedDict() + fields = {} fields['f1'] = {'type': 'text-single', 'label': 'Username', 'required': True} |