From 181aea737d5bce9479795b58c29b5a92da3bd48b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 5 Jun 2012 16:54:26 -0700 Subject: Add initial support for xml:lang for streams and stanza plugins. Remaining items are suitable default actions for language supporting interfaces. --- tests/test_stanza_element.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tests') 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): -- cgit v1.2.3 From 36c11ad9de7c1b5a199aa5a4302e33085513c126 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 19 Jun 2012 18:19:44 -0700 Subject: Ordering fixes for Python3.3 --- tests/test_stanza_xep_0050.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_stanza_xep_0050.py b/tests/test_stanza_xep_0050.py index ae584de4..e02e86c3 100644 --- a/tests/test_stanza_xep_0050.py +++ b/tests/test_stanza_xep_0050.py @@ -49,7 +49,7 @@ class TestAdHocCommandStanzas(SleekTest): iq['command']['actions'] = ['prev', 'next'] results = iq['command']['actions'] - expected = ['prev', 'next'] + expected = set(['prev', 'next']) self.assertEqual(results, expected, "Incorrect next actions: %s" % results) -- cgit v1.2.3