summaryrefslogtreecommitdiff
path: root/tests/test_stanza_element.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-05 16:54:26 -0700
committerLance Stout <lancestout@gmail.com>2012-06-18 22:00:33 -0700
commit181aea737d5bce9479795b58c29b5a92da3bd48b (patch)
tree75fed30d668542593e12a208bc88775c19d6d6b6 /tests/test_stanza_element.py
parentee702f40710219290508f95ac01df50a96d04f3c (diff)
downloadslixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.tar.gz
slixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.tar.bz2
slixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.tar.xz
slixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.zip
Add initial support for xml:lang for streams and stanza plugins.
Remaining items are suitable default actions for language supporting interfaces.
Diffstat (limited to 'tests/test_stanza_element.py')
-rw-r--r--tests/test_stanza_element.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_stanza_element.py b/tests/test_stanza_element.py
index 09093003..1b47e733 100644
--- a/tests/test_stanza_element.py
+++ b/tests/test_stanza_element.py
@@ -64,14 +64,18 @@ class TestElementBase(SleekTest):
stanza.append(substanza)
values = stanza.getStanzaValues()
- expected = {'bar': 'a',
+ expected = {'lang': '',
+ 'bar': 'a',
'baz': '',
- 'foo2': {'bar': '',
+ 'foo2': {'lang': '',
+ 'bar': '',
'baz': 'b'},
'substanzas': [{'__childtag__': '{foo}foo2',
+ 'lang': '',
'bar': '',
'baz': 'b'},
{'__childtag__': '{foo}subfoo',
+ 'lang': '',
'bar': 'c',
'baz': ''}]}
self.failUnless(values == expected,
@@ -555,12 +559,12 @@ class TestElementBase(SleekTest):
stanza = TestStanza()
- self.failUnless(set(stanza.keys()) == set(('bar', 'baz')),
+ self.failUnless(set(stanza.keys()) == set(('lang', 'bar', 'baz')),
"Returned set of interface keys does not match expected.")
stanza.enable('qux')
- self.failUnless(set(stanza.keys()) == set(('bar', 'baz', 'qux')),
+ self.failUnless(set(stanza.keys()) == set(('lang', 'bar', 'baz', 'qux')),
"Incorrect set of interface and plugin keys.")
def testGet(self):