Add test for nodeprep idempotency after explicitly using Unicode 3.2
This commit is contained in:
parent
4864b07e13
commit
baf9aaf26c
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue