summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-08-03 18:32:53 -0400
committerLance Stout <lancestout@gmail.com>2010-08-03 18:32:53 -0400
commitfec69be7318d9ad2a8e4ac128ac57f1969a6b852 (patch)
treeb5157e3feb9f5f012c7f140a04d1664c5baedec3 /tests
parent956fdf69709af8f59b92c0fe5e77490f2c670648 (diff)
downloadslixmpp-fec69be7318d9ad2a8e4ac128ac57f1969a6b852.tar.gz
slixmpp-fec69be7318d9ad2a8e4ac128ac57f1969a6b852.tar.bz2
slixmpp-fec69be7318d9ad2a8e4ac128ac57f1969a6b852.tar.xz
slixmpp-fec69be7318d9ad2a8e4ac128ac57f1969a6b852.zip
Update nick stanza with documentation and PEP8 style.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_messagestanzas.py13
-rw-r--r--tests/test_presencestanzas.py10
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)