diff options
author | Lance Stout <lancestout@gmail.com> | 2013-06-19 08:21:54 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2013-06-19 08:21:54 -0700 |
commit | baf9aaf26c80c87e770cdf35b1fa4fe231663246 (patch) | |
tree | f7de2362aab3d2f3c3af50011a138a30439b607c /tests/test_jid.py | |
parent | 4864b07e13e3ef82ba4c5add98a463e20e259863 (diff) | |
download | slixmpp-baf9aaf26c80c87e770cdf35b1fa4fe231663246.tar.gz slixmpp-baf9aaf26c80c87e770cdf35b1fa4fe231663246.tar.bz2 slixmpp-baf9aaf26c80c87e770cdf35b1fa4fe231663246.tar.xz slixmpp-baf9aaf26c80c87e770cdf35b1fa4fe231663246.zip |
Add test for nodeprep idempotency after explicitly using Unicode 3.2
Diffstat (limited to 'tests/test_jid.py')
-rw-r--r-- | tests/test_jid.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_jid.py b/tests/test_jid.py index aeb635a1..76e56586 100644 --- a/tests/test_jid.py +++ b/tests/test_jid.py @@ -1,5 +1,8 @@ +# -*- encoding: utf8 -*- +from __future__ import unicode_literals from sleekxmpp.test import * from sleekxmpp import JID, InvalidJID +from sleekxmpp.jid import nodeprep class TestJIDClass(SleekTest): @@ -278,5 +281,9 @@ class TestJIDClass(SleekTest): #self.assertRaises(InvalidJID, JID, '%s@example.com' % '\\20foo2') #self.assertRaises(InvalidJID, JID, '%s@example.com' % 'bar2\\20') + def testNodePrepIdemptotent(self): + node = 'ᴹᴵᴷᴬᴱᴸ' + self.assertEqual(nodeprep(node), nodeprep(nodeprep(node))) + suite = unittest.TestLoader().loadTestsFromTestCase(TestJIDClass) |