summaryrefslogtreecommitdiff
path: root/tests/test_jid.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_jid.py')
-rw-r--r--tests/test_jid.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_jid.py b/tests/test_jid.py
index aeb635a1..ed2aeea9 100644
--- a/tests/test_jid.py
+++ b/tests/test_jid.py
@@ -1,5 +1,9 @@
-from sleekxmpp.test import *
+# -*- encoding: utf8 -*-
+from __future__ import unicode_literals
+import unittest
+from sleekxmpp.test import SleekTest
from sleekxmpp import JID, InvalidJID
+from sleekxmpp.jid import nodeprep
class TestJIDClass(SleekTest):
@@ -278,5 +282,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)