Add test case for reported and items

Previous stanza test cases didn't have test cases for reported and item field types in forms.   This fixes that issue.

Modified stanzabase to use an ordered dict so that can guarentee the that 'items' in a form are added after reported.  Also updated the set of interfaces that are stored in Form to be a ordered set.  Used the order set implementation from:  https://code.activestate.com/recipes/576694/

The OrderedSet implementation is licensed under the MIT license and is developed by the same developer of the ordereddict.
This commit is contained in:
Robert Robinson
2015-09-15 10:05:53 -06:00
parent 93c705fb31
commit 0b14ef82d4
5 changed files with 159 additions and 6 deletions

View File

@@ -563,7 +563,7 @@ class ElementBase(object):
.. versionadded:: 1.0-Beta1
"""
values = {}
values = OrderedDict()
values['lang'] = self['lang']
for interface in self.interfaces:
if isinstance(self[interface], JID):