ϪfoxddlmZddlmZmZmZGddej ZGddej Zy))unittest)nameprepnodeprep resourceprepceZdZdZddZy)DeprecationTestszL Deprecations in L{twisted.words.protocols.jabber.xmpp_stringprep}. Nc ddlm}|j|jg}|j t |dd|j d|dd|j dt ||j |dy ) zX L{xmpp_stringprep.crippled} is deprecated and always returns C{False}. r)crippled)offendingFunctionscategoryzrtwisted.words.protocols.jabber.xmpp_stringprep.crippled was deprecated in Twisted 13.1.0: crippled is always FalsemessageFN).twisted.words.protocols.jabber.xmpp_stringprepr flushWarnings test_crippled assertEqualDeprecationWarninglen)selfr warningss N/usr/lib/python3/dist-packages/twisted/words/test/test_jabberxmppstringprep.pyrzDeprecationTests.test_crippleds L%%$:L:L9M%N +Xa[-DE  E QK " CM* 5)returnN)__name__ __module__ __qualname____doc__rrrrr s *rrc8eZdZdZddZddZddZddZddZy) XMPPStringPrepTestsa The nodeprep stringprep profile is similar to the resourceprep profile, but does an extra mapping of characters (table B.2) and disallows more characters (table C.1.1 and eight extra punctuation characters). Due to this similarity, the resourceprep tests are more extensive, and the nodeprep tests only address the mappings additional restrictions. The nameprep profile is nearly identical to the nameprep implementation in L{encodings.idna}, but that implementation assumes the C{UseSTD4ASCIIRules} flag to be false. This implementation assumes it to be true, and restricts the allowed set of characters. The tests here only check for the differences. Nc|jtjdd|jtjdd|jtjdd|jtjdd|jtjdd|jtjdd|j t tjd |jtjd d|jtjd d |j t tjd |j t tjd|j t tjd|jtjdd |j t tjd|j t tjd|j t tjd|j t tjd|j t tjd|j t tjd|j t tjd|j t tjd|jtjdd|j t tjd|j t tjd|j t tjd|j t tjd|j t tjd|j t tjd |j t tjd!|jtjd"d"|j t tjd#y)$NresourceResource u Henry ⅣzHenry IVu%foo­͏᠆᠋bar​⁠baz︀︈️ foobarbaz u u u​z…u᠎uuu󱈴u􏈴u򏿾u􏿿uu�u⿵úúu‎u‪u󠀁u󠁂ufoo־baru fooﵐbaruا1uا1بu󠀂)rrprepareassertNotEqual assertRaises UnicodeErrorrs rtestResourcePrepz$XMPPStringPrepTests.testResourcePrep1s --j9:F L00P , (<( A trailing dot in domain names is preserved. z example.com.N)rrr*r.s rtest_nameprepTrailingDotz,XMPPStringPrepTests.test_nameprepTrailingDotrs )).9>Jrr) rrrrr/r3r5r7r9rrrr!r!"s% )LVC D  Krr!N) twisted.trialrrrrrTestCaserr!rrrr<s<#*x((*,TK(++TKr