Remove UnescapedJID

It hadn’t been functional for many years, producing invalid JIDs and
being confusing for users anyway.  Better remove it.
This commit is contained in:
Emmanuel Gil Peyrot
2023-08-15 17:26:08 +02:00
parent 7c79f28587
commit f084ad2724
2 changed files with 0 additions and 108 deletions

View File

@@ -267,15 +267,6 @@ class TestJIDClass(SlixTest):
self.assertEqual(jid.domain.encode('utf-8'), b'b\xc3\xbccher.ch')
def testJIDUnescape(self):
jid = JID('here\\27s_a_wild_\\26_\\2fcr%zy\\2f_\\40ddress\\20for\\3a\\3cwv\\3e(\\22IMPS\\22)\\5c@example.com')
ujid = jid.unescape()
self.assertEqual(ujid.local, 'here\'s_a_wild_&_/cr%zy/_@ddress for:<wv>("imps")\\')
jid = JID('blah\\5cfoo\\5c20bar@example.com')
ujid = jid.unescape()
self.assertEqual(ujid.local, 'blah\\foo\\20bar')
def testStartOrEndWithEscapedSpaces(self):
local = ' foo'
self.assertRaises(InvalidJID, JID, '%s@example.com' % local)