diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_messagestanzas.py | 13 | ||||
-rw-r--r-- | tests/test_presencestanzas.py | 10 |
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/test_messagestanzas.py b/tests/test_messagestanzas.py index 5e2a667a..9b7b0a3f 100644 --- a/tests/test_messagestanzas.py +++ b/tests/test_messagestanzas.py @@ -25,7 +25,7 @@ class TestMessageStanzas(SleekTest): self.failUnless(str(msg['to']) == 'usr@server.tld') def testHTMLPlugin(self): - "Test message/html/html stanza" + "Test message/html/body stanza" msg = self.Message() msg['to'] = "fritzy@netflint.net/sleekxmpp" msg['body'] = "this is the plaintext message" @@ -43,4 +43,15 @@ class TestMessageStanzas(SleekTest): </html> </message>""") + def testNickPlugin(self): + "Test message/nick/nick stanza." + msg = self.Message() + msg['nick']['nick'] = 'A nickname!' + self.checkMessage(msg, """ + <message> + <nick xmlns="http://jabber.org/nick/nick">A nickname!</nick> + </message> + """) + + suite = unittest.TestLoader().loadTestsFromTestCase(TestMessageStanzas) diff --git a/tests/test_presencestanzas.py b/tests/test_presencestanzas.py index 2cab3af7..6c11263f 100644 --- a/tests/test_presencestanzas.py +++ b/tests/test_presencestanzas.py @@ -53,5 +53,15 @@ class TestPresenceStanzas(SleekTest): self.failUnless(c.roster == {}, "Roster updated for superfulous unavailable presence") + def testNickPlugin(self): + """Test presence/nick/nick stanza.""" + p = self.Presence() + p['nick']['nick'] = 'A nickname!' + self.checkPresence(p, """ + <presence> + <nick xmlns="http://jabber.org/nick/nick">A nickname!</nick> + </presence> + """) + suite = unittest.TestLoader().loadTestsFromTestCase(TestPresenceStanzas) |