-í
é¶<c       s–   d  k  Z  d  k Z d  k Z d  k Z y d k l Z Wn  e j
 o d k l Z n Xd e i f d „  ƒ  YZ d „  Z	 e
 d j o e	 ƒ  n d  S(   N(   s   StringIOs   MessageTestCasec      sk   t  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z RS(   Nc    s   t  i t | ƒ ƒ Sd  S(   N(   s   rfc822s   Messages   StringIOs   msg(   s   selfs   msg(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   create_message s    c    s†   |  i d ƒ } |  i | i d ƒ d j ƒ |  i | i d ƒ d j ƒ |  i | i d ƒ d j ƒ |  i | i d d ƒ d j ƒ d  S(   Ns)   To: "last, first" <userid@foo.net>

test
s   tos   "last, first" <userid@foo.net>s   TOs   No-Such-Headers    s   No-Such-Value(   s   selfs   create_messages   msgs   assert_s   get(   s   selfs   msg(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_get s
    c    s²   |  i d ƒ } |  i | i d ƒ ƒ |  i | i d d ƒ d j ƒ |  i | i d d ƒ d j ƒ |  i | d d j ƒ |  i | i d ƒ d j ƒ |  i | d d j ƒ d  S(	   Ns)   To: "last, first" <userid@foo.net>

test
s
   New-Headers	   New-Values   Different-Values
   new-headers   Another-Headers    s   another-header(   s   selfs   create_messages   msgs   assert_s   has_keys
   setdefault(   s   selfs   msg(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_setdefault s    c 
   s'  |  i | ƒ } d } xÃ | i d ƒ | i d ƒ D]¥ \ } } y& | | d | | d f \ } } Wn/ t j
 o# d Gt | ƒ Gt | ƒ GHq2 n X| d } | | j o
 | | j o n d Gt | ƒ Gt | ƒ GHq2 W| i d ƒ }	 |	 o2 |  i |	 d d d	 d
 d d d d d f	 d ƒ n d S(   s   Check addresses and the date.i    s   tos   cci   s   extra parsed address:s
   not found:s   dateiÏ  i   i   i9   i#   s   date conversion failedN(   s   selfs   create_messages   msgs   ms   is   getaddrlists   ns   as   resultss   mns   mas
   IndexErrors   reprs   getdates   outs   assertEqual(
   s   selfs   msgs   resultss   as   mas   is   mns   ms   ns   out(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   check% s&      &
	c  	  sé   |  i d d d f g ƒ |  i d d d f g ƒ |  i d d d f d d f g ƒ |  i d d	 d f g ƒ |  i d
 d d f d d f d d f d d f d d f d d f g ƒ |  i d d d f g ƒ |  i d d d f g ƒ d  S(   Ns¦   Date:    Wed, 13 Jan 1999 23:57:35 -0500
From:    Guido van Rossum <guido@CNRI.Reston.VA.US>
To:      "Guido van
	 : Rossum" <guido@python.org>
Subject: test2

test2
s   Guido van
	 : Rossums   guido@python.orgs“   From: Barry <bwarsaw@python.org
To: guido@python.org (Guido: the Barbarian)
Subject: nonsense
Date: Wednesday, January 13 1999 23:57:35 -0500

tests   Guido: the Barbariansœ   From: Barry <bwarsaw@python.org
To: guido@python.org (Guido: the Barbarian)
Cc: "Guido: the Madman" <guido@python.org>
Date:  13-Jan-1999 23:57:35 EST

tests   Guido: the Madmansw   To: "The monster with
     the very long name: Guido" <guido@python.org>
Date:    Wed, 13 Jan 1999 23:57:35 -0500

tests/   The monster with
     the very long name: Guidosô   To: "Amit J. Patel" <amitp@Theory.Stanford.EDU>
CC: Mike Fletcher <mfletch@vrtelecom.com>,
        "'string-sig@python.org'" <string-sig@python.org>
Cc: fooz@bat.com, bart@toof.com
Cc: goit@lip.com
Date:    Wed, 13 Jan 1999 23:57:35 -0500

tests   Amit J. Patels   amitp@Theory.Stanford.EDUs   Mike Fletchers   mfletch@vrtelecom.coms   'string-sig@python.org's   string-sig@python.orgs    s   fooz@bat.coms   bart@toof.coms   goit@lip.comsV   To: Some One <someone@dom.ain>
From: Anudder Persin <subuddy.else@dom.ain>
Date:

tests   Some Ones   someone@dom.ains%   To: person@dom.ain (User J. Person)

s   User J. Persons   person@dom.ain(   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys
   test_basic? s    						=		c    s/   |  i d d d f d d f d d f g ƒ d  S(   Nsr   To: <[smtp:dd47@mail.xxx.edu]_at_hmhq@hdq-mdm1-imgout.companay.com>
Date:    Wed, 13 Jan 1999 23:57:35 -0500

tests    s   dd47@mail.xxx.edus%   _at_hmhq@hdq-mdm1-imgout.companay.com(   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_twisted„ s    	c    s   |  i d d d f g ƒ d  S(   Ns(   To: "last, first" <userid@foo.net>

tests   last, firsts   userid@foo.net(   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_commas_in_full_name’ s    	c    s   |  i d d d f g ƒ d  S(   Ns5   To: (Comment stuff) "Quoted name"@somewhere.com

tests   Comment stuffs   "Quoted name"@somewhere.com(   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_quoted_nameœ s    	c    s   |  i d d d f g ƒ d  S(   NsE   To: :
Cc: goit@lip.com
Date:    Wed, 13 Jan 1999 23:57:35 -0500

tests    s   goit@lip.com(   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_bogus_to_header£ s    	c    s   |  i d d d f g ƒ d  S(   Ns   To: guido@[132.151.1.21]

foos    s   guido@[132.151.1.21](   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_addr_ipquad¬ s    	c    s   |  i d d d f g ƒ d  S(   Ns%   To: User J. Person <person@dom.ain>

s   User J. Persons   person@dom.ain(   s   selfs   check(   s   self(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   test_rfc2822_phrases³ s    	(   s   __name__s
   __module__s   create_messages   test_gets   test_setdefaults   checks
   test_basics   test_twisteds   test_commas_in_full_names   test_quoted_names   test_bogus_to_headers   test_addr_ipquads   test_rfc2822_phrases(    (    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   MessageTestCase s   						E		
				c      s   t  i t ƒ d  S(   N(   s   test_supports   run_unittests   MessageTestCase(    (    (    s&   /usr/lib/python2.2/test/test_rfc822.pys	   test_mainÅ s    s   __main__(   s   rfc822s   syss   test_supports   unittests	   cStringIOs   StringIOs   ImportErrors   TestCases   MessageTestCases	   test_mains   __name__(   s   syss   test_supports	   test_mains   StringIOs   unittests   rfc822s   MessageTestCase(    (    s&   /usr/lib/python2.2/test/test_rfc822.pys   ? s   				¹	