# Path: pyxmpp/jid.py
# def are_domains_equal(a,b):
#     def __new__(cls,node_or_jid=None,domain=None,resource=None,check=True):
#     def __setattr__(self,name,value):
#     def __from_unicode(self,s,check=True):
#     def __set_node(self,s):
#     def __set_domain(self,s):
#     def __set_resource(self,s):
#     def __str__(self):
#     def __unicode__(self):
#     def __repr__(self):
#     def as_utf8(self):
#     def as_string(self):
#     def as_unicode(self):
#     def bare(self):
#     def __eq__(self,other):
#     def __ne__(self,other):
#     def __cmp__(self,other):
#     def __hash__(self):
# class JID(object):
# 
# Path: pyxmpp/xmppstringprep.py
# class LookupFunction:
# class LookupTable:
# class Profile:
#     def __init__(self,function):
#     def __init__(self,singles,ranges):
#     def lookup(self,c):
# def b1_mapping(uc):
# def nfkc(data):
#     def __init__(self,unassigned,mapping,normalization,prohibited,bidi=1):
#     def prepare(self,data):
#     def prepare_query(self,s):
#     def map(self,s):
#     def prohibit(self,s):
#     def check_unassigned(self,s):
#     def check_bidi(self,s):
# def set_stringprep_cache_size(size):
# A_1=LookupFunction(stringprep.in_table_a1)
# B_1=LookupFunction(b1_mapping)
# B_2=LookupFunction(stringprep.map_table_b2)
# B_3=LookupFunction(stringprep.map_table_b3)
# C_1_1=LookupFunction(stringprep.in_table_c11)
# C_1_2=LookupFunction(stringprep.in_table_c12)
# C_2_1=LookupFunction(stringprep.in_table_c21)
# C_2_2=LookupFunction(stringprep.in_table_c22)
# C_3=LookupFunction(stringprep.in_table_c3)
# C_4=LookupFunction(stringprep.in_table_c4)
# C_5=LookupFunction(stringprep.in_table_c5)
# C_6=LookupFunction(stringprep.in_table_c6)
# C_7=LookupFunction(stringprep.in_table_c7)
# C_8=LookupFunction(stringprep.in_table_c8)
# C_9=LookupFunction(stringprep.in_table_c9)
# D_1=LookupFunction(stringprep.in_table_d1)
# D_2=LookupFunction(stringprep.in_table_d2)


import unittest
        import weakref
from pyxmpp.jid import JID,JIDError
from pyxmpp import xmppstringprep
    (u"jajcus@jabber.bnet.pl/Test",
        (u"jajcus",u"jabber.bnet.pl",u"Test")),
    (u"Jajcus@jaBBer.bnet.pl/Test",
        (u"jajcus",u"jabber.bnet.pl",u"Test")),
    (u"Jajcus@jaBBer.bnet.pl/test",
        (u"jajcus",u"jabber.bnet.pl",u"test")),
    (u"jajcuś@dżabber.example.com/Test",
        (u"jajcuś",u"dżabber.example.com",u"Test")),
    (u"JAJCUŚ@DŻABBER.EXAMPLE.COM/TEST",
        (u"jajcuś",u"dżabber.example.com",u"TEST")),
    (u"%s@%s/%s" % (u"x"*1023,u"x"*1023,u"x"*1023),
        (u"x"*1023,u"x"*1023,u"x"*1023)),
]

valid_tuples=[
    ((u"a",u"b",u"c"),u"a@b/c"),
    ((None,u"example.com",None),u"example.com"),
    ((u"",u"example.com",u""),u"example.com"),
    ((None,u"example.com","Test"),u"example.com/Test"),
    ((u"jajcus",u"jabber.bnet.pl",None),u"jajcus@jabber.bnet.pl"),
    ((u"jajcus",u"jabber.bnet.pl",u"Test"),u"jajcus@jabber.bnet.pl/Test"),
    ((u"Jajcus",u"jaBBer.bnet.pl",u"Test"),u"jajcus@jabber.bnet.pl/Test"),
    ((u"Jajcus",u"jaBBer.bnet.pl",u"test"),u"jajcus@jabber.bnet.pl/test"),
    ((u"jajcuś",u"dżabber.example.com",u"Test"),u"jajcuś@dżabber.example.com/Test"),
    ((u"JAJCUŚ",u"DŻABBER.EXAMPLE.COM",u"TEST"),u"jajcuś@dżabber.example.com/TEST"),
]

invalid_jids=[
    u"/Test",
    u"#@$%#^$%#^&^$",

# Path: pyxmpp/jid.py
# def are_domains_equal(a,b):
#     def __new__(cls,node_or_jid=None,domain=None,resource=None,check=True):
#     def __setattr__(self,name,value):
#     def __from_unicode(self,s,check=True):
#     def __set_node(self,s):
#     def __set_domain(self,s):
#     def __set_resource(self,s):
#     def __str__(self):
#     def __unicode__(self):
#     def __repr__(self):
#     def as_utf8(self):
#     def as_string(self):
#     def as_unicode(self):
#     def bare(self):
#     def __eq__(self,other):
#     def __ne__(self,other):
#     def __cmp__(self,other):
#     def __hash__(self):
# class JID(object):
# 
# Path: pyxmpp/xmppstringprep.py
# class LookupFunction:
# class LookupTable:
# class Profile:
#     def __init__(self,function):
#     def __init__(self,singles,ranges):
#     def lookup(self,c):
# def b1_mapping(uc):
# def nfkc(data):
#     def __init__(self,unassigned,mapping,normalization,prohibited,bidi=1):
#     def prepare(self,data):
#     def prepare_query(self,s):
#     def map(self,s):
#     def prohibit(self,s):
#     def check_unassigned(self,s):
#     def check_bidi(self,s):
# def set_stringprep_cache_size(size):
# A_1=LookupFunction(stringprep.in_table_a1)
# B_1=LookupFunction(b1_mapping)
# B_2=LookupFunction(stringprep.map_table_b2)
# B_3=LookupFunction(stringprep.map_table_b3)
# C_1_1=LookupFunction(stringprep.in_table_c11)
# C_1_2=LookupFunction(stringprep.in_table_c12)
# C_2_1=LookupFunction(stringprep.in_table_c21)
# C_2_2=LookupFunction(stringprep.in_table_c22)
# C_3=LookupFunction(stringprep.in_table_c3)
# C_4=LookupFunction(stringprep.in_table_c4)
# C_5=LookupFunction(stringprep.in_table_c5)
# C_6=LookupFunction(stringprep.in_table_c6)
# C_7=LookupFunction(stringprep.in_table_c7)
# C_8=LookupFunction(stringprep.in_table_c8)
# C_9=LookupFunction(stringprep.in_table_c9)
# D_1=LookupFunction(stringprep.in_table_d1)
# D_2=LookupFunction(stringprep.in_table_d2)


# Path: tests/jid.py
import unittest
        import weakref
from pyxmpp.jid import JID,JIDError
from pyxmpp import xmppstringprep

    (u"jajcus@jabber.bnet.pl/Test",
        (u"jajcus",u"jabber.bnet.pl",u"Test")),
    (u"Jajcus@jaBBer.bnet.pl/Test",
        (u"jajcus",u"jabber.bnet.pl",u"Test")),
    (u"Jajcus@jaBBer.bnet.pl/test",
        (u"jajcus",u"jabber.bnet.pl",u"test")),
    (u"jajcuś@dżabber.example.com/Test",
        (u"jajcuś",u"dżabber.example.com",u"Test")),
    (u"JAJCUŚ@DŻABBER.EXAMPLE.COM/TEST",
        (u"jajcuś",u"dżabber.example.com",u"TEST")),
    (u"%s@%s/%s" % (u"x"*1023,u"x"*1023,u"x"*1023),
        (u"x"*1023,u"x"*1023,u"x"*1023)),
]

valid_tuples=[
    ((u"a",u"b",u"c"),u"a@b/c"),
    ((None,u"example.com",None),u"example.com"),
    ((u"",u"example.com",u""),u"example.com"),
    ((None,u"example.com","Test"),u"example.com/Test"),
    ((u"jajcus",u"jabber.bnet.pl",None),u"jajcus@jabber.bnet.pl"),
    ((u"jajcus",u"jabber.bnet.pl",u"Test"),u"jajcus@jabber.bnet.pl/Test"),
    ((u"Jajcus",u"jaBBer.bnet.pl",u"Test"),u"jajcus@jabber.bnet.pl/Test"),
    ((u"Jajcus",u"jaBBer.bnet.pl",u"test"),u"jajcus@jabber.bnet.pl/test"),
    ((u"jajcuś",u"dżabber.example.com",u"Test"),u"jajcuś@dżabber.example.com/Test"),
    ((u"JAJCUŚ",u"DŻABBER.EXAMPLE.COM",u"TEST"),u"jajcuś@dżabber.example.com/TEST"),
]

invalid_jids=[
    u"/Test",
    u"#@$%#^$%#^&^$",

    u"<>@example.com",