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.
This commit is contained in:
Emmanuel Gil Peyrot
2020-12-06 16:34:52 +01:00
parent 05749c4969
commit cd4c9f82fc
8 changed files with 14 additions and 53 deletions

View File

@@ -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'

View File

@@ -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}