
Y]c           @   s  d  d l  m Z d  d l m Z d  d l m Z d  d l m Z m Z d  d l	 m
 Z
 d  d l m Z d  d l m Z m Z d  d l m Z d  d	 l m Z d  d
 l m Z d  d l Z d  d l Z d  d l Z d  d l m Z d e f d     YZ d e f d     YZ d   Z e d d  Z d   Z d e f d     YZ d e f d     YZ d e f d     YZ  d e f d     YZ! d e! f d     YZ" d e f d      YZ# d!   Z$ e% d" k re$   n  d S(#   i(   t   TestCase(   t   setup_testing_defaults(   t   Headers(   t   BaseHandlert   BaseCGIHandler(   t   util(   t	   validator(   t
   WSGIServert   WSGIRequestHandler(   t   make_server(   t   StringIO(   t
   BaseServerN(   t   test_supportt
   MockServerc           B   s    e  Z d  Z d   Z d   Z RS(   s   Non-socket HTTP serverc         C   s!   t  j |  | |  |  j   d  S(   N(   R   t   __init__t   server_bind(   t   selft   server_addresst   RequestHandlerClass(    (    s"   lib/python2.7/test/test_wsgiref.pyR      s    c         C   s/   |  j  \ } } | |  _ | |  _ |  j   d  S(   N(   R   t   server_namet   server_portt   setup_environ(   R   t   hostt   port(    (    s"   lib/python2.7/test/test_wsgiref.pyR      s    		(   t   __name__t
   __module__t   __doc__R   R   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR      s   	t   MockHandlerc           B   s    e  Z d  Z d   Z d   Z RS(   s   Non-socket HTTP handlerc         C   s%   |  j  |  _ |  j \ |  _ |  _ d  S(   N(   t   requestt
   connectiont   rfilet   wfile(   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   setup"   s    c         C   s   d  S(   N(    (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   finish&   s    (   R   R   R   R    R!   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR       s   	c         C   s   | d d d g  d g S(	   Ns   200 OKs   Content-Types
   text/plaint   Dates   Mon, 05 Jun 2006 18:49:54 GMTs   Hello, world!(   s   Content-Types
   text/plain(   R"   s   Mon, 05 Jun 2006 18:49:54 GMT(    (   t   environt   start_response(    (    s"   lib/python2.7/test/test_wsgiref.pyt	   hello_app*   s    
s   GET / HTTP/1.0

c         C   s   t  d d |  t t  } t |  t   t   t j f \ } } } } | t _ z | j | | f d  Wd  | t _ X| j   | j   f S(   Nt    iP   s	   127.0.0.1i"  (   s	   127.0.0.1i"  (   R	   R   R   R
   t   syst   stderrt   finish_requestt   getvalue(   t   appt   datat   servert   inpt   outt   errt   olderr(    (    s"   lib/python2.7/test/test_wsgiref.pyt	   run_amock1   s    -	
c         C   s  |    } d } x1 | D]) } | | | k s5 t   n  | d 7} q Wy | | Wn t k
 rb n Xt  d |   y t t f Wn t k
 r n X|    } t |  | k	 r t   n  x) | D]! } | j   | k s t   q q Wy | j   Wn t k
 rn Xt  d |   d S(   s  Utility to compare a generic 2.1/2.2+ iterator with an iterable

    If running under Python 2.2+, this tests the iterator using iter()/next(),
    as well as __getitem__.  'make_it' must be a function returning a fresh
    iterator to be tested (since this may test the iterator twice).i    i   s   Too many items from __getitem__s   Too many items from .next()N(   t   AssertionErrort
   IndexErrort   itert   StopIterationt	   NameErrort   next(   t   make_itt   matcht   itt   nt   item(    (    s"   lib/python2.7/test/test_wsgiref.pyt   compare_generic_iter>   s4    	 		 	 t   IntegrationTestsc           B   s8   e  Z e d   Z d   Z d   Z d   Z d   Z RS(   c         C   s=   |  j  | d t j j   d d | r- d p0 d d  d  S(   Ns/   HTTP/1.0 200 OK
Server: WSGIServer/0.1 Python/i    sA   
Content-Type: text/plain
Date: Mon, 05 Jun 2006 18:49:54 GMT
s   Content-Length: 13
R&   s   
Hello, world!(   t   assertEqualR'   t   versiont   split(   R   R/   t
   has_length(    (    s"   lib/python2.7/test/test_wsgiref.pyt   check_helloe   s    	(c         C   s    t    \ } } |  j |  d  S(   N(   R2   RD   (   R   R/   R0   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   test_plain_hellop   s    c         C   s?   t  d d d d d  \ } } |  j | j   d d  d  S(   NR,   s   GET t   xi  s    HTTP/1.0

i    s!   HTTP/1.0 414 Request-URI Too Long(   R2   R@   t
   splitlines(   R   R/   R0   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   test_request_lengtht   s    !c         C   s/   t  t t   \ } } |  j | d t d  S(   NRC   (   R2   R   R%   RD   t   False(   R   R/   R0   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   test_validated_helloy   s    c         C   sU   d   } t  t |   \ } } |  j | j d   |  j | j   d d  d  S(   Nc         S   s   | d d  d g S(   Ns   200 OKs   Content-Types
   text/plains   Hello, world!(   s   Content-Types
   text/plain(    (   R#   R$   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   bad_app   s    s;   A server error occurred.  Please contact the administrator.is]   AssertionError: Headers (('Content-Type', 'text/plain')) must be of type list: <type 'tuple'>(   R2   R   t
   assertTruet   endswithR@   RG   (   R   RK   R/   R0   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   test_simple_validation_error~   s    	
(   R   R   t   TrueRD   RE   RH   RJ   RN   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR?   c   s
   			t   UtilityTestsc           B   s   e  Z d    Z d d  Z d   Z d   Z d d  Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   sf   i | d 6| d 6} t  j |  |  j t  j |  |  |  j | d |  |  j | d |  | S(   Nt   SCRIPT_NAMEt	   PATH_INFO(   R   R   R@   t   shift_path_info(   R   t   sn_int   pi_int   partt   sn_outt   pi_outt   env(    (    s"   lib/python2.7/test/test_wsgiref.pyt
   checkShift   s    c         C   s   i  } t  j |  t | t  r9 |  j | | t  n |  j | | |  i | | 6} t  j |  |  j | | |  d  S(   N(   R   R   t
   isinstanceR
   t   assertIsInstanceR@   t   assertIs(   R   t   keyt   valuet   altRY   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkDefault   s    c         K   s%   t  j |  |  j | | |  d  S(   N(   R   R   R@   (   R   R^   R_   t   kw(    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkCrossDefault   s    c         K   s*   t  j |  |  j t  j |  |  d  S(   N(   R   R   R@   t   application_uri(   R   t   uriRb   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkAppURI   s    i   c         K   s-   t  j |  |  j t  j | |  |  d  S(   N(   R   R   R@   t   request_uri(   R   Re   t   queryRb   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkReqURI   s    c         C   s}   | | d  } t  | |  |   } |  j | j j  x | D] } q? W|  j | j j  | j   |  j | j j  d  S(   Nc         S   s   t  j t |   |  S(   N(   R   t   FileWrapperR
   (   t   textt   size(    (    s"   lib/python2.7/test/test_wsgiref.pyR9      s    (   R>   t   assertFalset   fileliket   closedt   closeRL   (   R   Rk   Rl   R:   R9   R;   R=   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkFW   s    	
c         C   s   |  j  d d d d d  |  j  d d d d d  |  j  d d d  d d  |  j  d d d d d  |  j  d d	 d d d  d  S(
   NR&   t   /s   /xRF   s   /as   /x/ys   /a/xs   /ys   /x/(   RZ   t   None(   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testSimpleShifts   s
    c         C   s  |  j  d d d d d  |  j  d d d d d  |  j  d d d d	 d  |  j  d d
 d d	 d  |  j  d d d d	 d  |  j  d d d d	 d  |  j  d d d d d  |  j  d d d d d  |  j  d d d d d  |  j  d d d d d  |  j  d d d  d d  d  S(   Ns   /a/bs   /../ys   ..s   /as   /yR&   s   //yt   ys   /a/b/ys   //y/Rr   s   /./ys   /./y/s   ///./..//y/.//s   /y/s   ///s   /a/b/s   /.//s   /x//RF   s   /a/b/xs   /.(   RZ   Rs   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testNormalizedShifts   s    c         C   sp   xi d d d d d d d d d f d  d! d" d t  d  f d t    f d# g D] \ } } |  j | |  qL Wd  S($   Nt   SERVER_NAMEs	   127.0.0.1t   SERVER_PORTt   80t   SERVER_PROTOCOLs   HTTP/1.0t	   HTTP_HOSTt   REQUEST_METHODt   GETRQ   R&   RR   Rr   s   wsgi.versioni   i    s   wsgi.run_onces   wsgi.multithreads   wsgi.multiprocesss
   wsgi.inputs   wsgi.errorss   wsgi.url_schemet   http(   Rw   s	   127.0.0.1(   Rx   Ry   (   Rz   s   HTTP/1.0(   R{   s	   127.0.0.1(   R|   R}   (   RQ   R&   (   RR   Rr   (   i   i    (   s   wsgi.run_oncei    (   s   wsgi.multithreadi    (   s   wsgi.multiprocessi    (   s   wsgi.url_schemeR~   (   R
   Ra   (   R   R^   R_   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testDefaults   s     	c         C   s   |  j  d d d d |  j  d d d d |  j  d d d d |  j  d d d d	 |  j  d d
 d d |  j  d d d d |  j  d d d d d  S(   NR{   s   foo.barRw   s   wsgi.url_schemet   httpst   HTTPSt   ont   1t   yesR~   t   fooRx   Ry   t   443(   Rc   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testCrossDefaults   s    c         C   s   |  j  t j i   d  |  j  t j i d d 6 d  |  j  t j i d d 6 d  |  j  t j i d d 6 d  |  j  t j i d d 6 d  d  S(   NR~   R   R   R   R   R   R   (   R@   R   t   guess_scheme(   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testGuessScheme   s
       c         C   s   |  j  d  |  j  d d d |  j  d d d |  j  d d d	 d
 d |  j  d d d |  j  d d d d d |  j  d d d |  j  d d
 d d d  d  S(   Ns   http://127.0.0.1/s   http://127.0.0.1/spamRQ   s   /spams   http://127.0.0.1/sp%E4ms   /spms   http://spam.example.com:2071/R{   s   spam.example.com:2071Rx   t   2071s   http://spam.example.com/Rw   s   spam.example.coms	   127.0.0.1s   https://127.0.0.1/R   R   s   http://127.0.0.1:8000/t   8000(   Rf   Rs   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testAppURIs   s    c      	   C   s   |  j  d  |  j  d d d |  j  d d d |  j  d d d d	 d |  j  d
 d d d	 d |  j  d d d d	 d |  j  d d d d	 d |  j  d d d d	 d d d |  j  d d d d	 d d d |  j  d d d d d	 d d d d  S(   Ns   http://127.0.0.1/s   http://127.0.0.1/spamRQ   s   /spams   http://127.0.0.1/sp%E4ms   /spms   http://127.0.0.1/spammity/spams	   /spammityRR   s    http://127.0.0.1/spammity/sp%E4ms"   http://127.0.0.1/spammity/spam;hams	   /spam;hams/   http://127.0.0.1/spammity/spam;cookie=1234,5678s   /spam;cookie=1234,5678s%   http://127.0.0.1/spammity/spam?say=nit   QUERY_STRINGs   say=nis'   http://127.0.0.1/spammity/spam?s%E4y=nis   s%E4y=nii    (   Ri   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testReqURIs  s"    c         C   s)   |  j  d d d d d d d g  d  S(   Nt   xyzi2   ix   i(   i
   (   Rq   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testFileWrapper  s    c         C   s   xY d j    D]K } xB | | j   | j   | j   f D] } |  j t j |   q8 Wq WxY d j    D]K } xB | | j   | j   | j   f D] } |  j t j |   q Wqi Wd  S(   Nsb   Connection Keep-Alive Proxy-Authenticate Proxy-Authorization TE Trailers Transfer-Encoding Upgrades4   Accept Cache-Control Date Pragma Trailer Via Warning(   RB   t   titlet   uppert   lowerRL   R   t   is_hop_by_hopRm   (   R   t   hopR`   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testHopByHop  s    ++N(   R   R   RZ   Rs   Ra   Rc   Rf   Ri   Rq   Rt   Rv   R   R   R   R   R   R   R   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyRP      s   													t   HeaderTestsc           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s=  d g } |  j  t t g    d  |  j  t t |   d  |  j  t |  j   d g  |  j  t |  j   d g  |  j  t |  j   |  |  j t |  j   |  t g   } | d =d | d <xx | j | j | j	 | j
 | j f D]R } |  j | d   |  j | d   |  j | d   |  j | d   q W|  j  | d d  d	 | d <|  j  | d d	  |  j  | j
 d  d	 g  |  j  | j	 d d
  d	  |  j  | j	 d d
  d
  |  j  | j d d
  d	  |  j  | j d d
  d
  |  j  | d d	  |  j  | d d
  d  S(   NRF   Ru   i    i   R   t   bart   Foot   FOOt   bazt   wheet   zoo(   RF   Ru   (   R@   t   lenR   t   keyst   valuest   itemst   assertIsNott   has_keyt   __contains__t   gett   get_allt   __getitem__RL   Rm   t
   setdefault(   R   t   testt   ht   m(    (    s"   lib/python2.7/test/test_wsgiref.pyt   testMappingInterface/  s2    	  
+
c         C   s   |  j  t t d  d  S(   NR   (   t   assertRaisest	   TypeErrorR   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testRequireListN  s    c         C   s   t  g   } |  j t |  d  | j d d d d |  j | d d  |  j t |  d  | j d d d	 d  |  j | j d  d d
 g  |  j t |  d  d  S(   Ns   
R   R   R   t   spams   bar; baz="spam"s   foo: bar; baz="spam"

R   t   cheeses   bar; cheeses*   foo: bar; baz="spam"
Foo: bar; cheese

(   R   R@   t   strt
   add_headerRs   R   (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt
   testExtrasR  s    (   R   R   R   R   R   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR   -  s   		t   ErrorHandlerc           B   s,   e  Z d  Z e e j j    Z d   Z RS(   s/   Simple handler subclass for testing BaseHandlerc      
   K   s?   t  |  t j |  t d  t   t   | d t d t d  S(   NR&   t   multithreadt   multiprocess(   R   R   R   R
   RO   (   R   Rb   (    (    s"   lib/python2.7/test/test_wsgiref.pyR   m  s    
(	   R   R   R   t   dictt   osR#   R   t
   os_environR   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR   e  s   t   TestHandlerc           B   s   e  Z d  Z d   Z RS(   sA   Simple handler subclass for testing BaseHandler, w/error passthruc         C   s     d  S(   N(    (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   handle_errorw  s    (   R   R   R   R   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR   t  s   t   HandlerTestsc           B   sk   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z RS(   c         C   ss   | j  } xc d d d d d g D]L } | d k rF | j d  k rF q n  |  j t | d |  | d |  q Wd  S(   NRA   R   R   t   run_oncet   file_wrappert   wsgi_s   wsgi.(   R#   t   wsgi_file_wrapperRs   R@   t   getattr(   R   t   handlerRY   t   attr(    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkEnvironAttrs}  s    	c         C   s   i  } t  |  | j } d d l m } x= | j   D]/ \ } } | | k r6 |  j | | |  q6 q6 Wx* | j   D] \ } } |  j | |  qv Wd  S(   Ni(   R#   (   R   R#   R   R   R@   t   assertIn(   R   R   t   emptyRY   R#   t   kt   v(    (    s"   lib/python2.7/test/test_wsgiref.pyt   checkOSEnviron  s     
	c         C   sN   t  d d  } | j   |  j |  |  j |  |  j | j d d  d  S(   Nt   Xt   Y(   R   R   R   R   R@   R#   (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testEnviron  s
    
c         C   sG   t  d  d  d  i   } | j   x! d D] } |  j | | j  q& Wd  S(   Ns   wsgi.url_schemes
   wsgi.inputs   wsgi.errors(   s   wsgi.url_schemes
   wsgi.inputs   wsgi.errors(   R   Rs   R   R   R#   (   R   R   R^   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testCGIEnviron  s    
c         C   s^   t  d d  } | j   |  j | j d d  t    } | j   |  j | j d d  d  S(   NR   R   s   wsgi.url_schemeR   R~   (   R   R   R@   R#   (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt
   testScheme  s     
	 
c         C   sY   t    } x3 d d d d g D] } |  j t t | |   q W|  j t | j d  d  S(   Nt   _flusht	   get_stdint
   get_stderrt   add_cgi_varsR   (   R   R   t   NotImplementedErrorR   t   _write(   R   R   t   name(    (    s"   lib/python2.7/test/test_wsgiref.pyt   testAbstractMethods  s
    	c         C   s   d   } d   } d   } t    } | j |  |  j | j j   d  t    } | j |  |  j | j j   d  t    } | j |  |  j | j j   d  d  S(   Nc         S   s   | d g   |  d g S(   Ns   200 OKs   wsgi.url_scheme(    (   t   et   s(    (    s"   lib/python2.7/test/test_wsgiref.pyt   trivial_app1  s    c         S   s   | d g   |  d  g  S(   Ns   200 OKs   wsgi.url_scheme(    (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   trivial_app2  s    c         S   s   | d d g  g  S(   Ns   200 OKs   Content-Lengtht   12345(   s   Content-LengthR   (    (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   trivial_app4  s    s)   Status: 200 OK
Content-Length: 4

https   Status: 200 OK

https)   Status: 200 OK
Content-Length: 12345

(   R   t   runR@   t   stdoutR*   (   R   R   R   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testContentLength  s    						c         C   s   d   } d   } t    } | j |  |  j | j j   d  |  j | j j   d  t    } | j |  |  j | j j   d | j t | j  | j f  |  j	 | j j   j
 d  d  d  S(   Nc         S   s   | d g   g  S(   Ns   200 OK(    (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   non_error_app  s    c         S   s   t  d   d  S(   Ns    This should be caught by handler(   R3   (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt	   error_app  s    s%   Status: 200 OK
Content-Length: 0

R&   s>   Status: %s
Content-Type: text/plain
Content-Length: %d

%sR3   i(   R   R   R@   R   R*   R(   t   error_statusR   t
   error_bodyt   assertNotEqualt   find(   R   R   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testBasicErrorOutput  s    				 c            sn   d     f d   } t    } | j |  |  j | j j   d    |  j | j j   j d  d  d  S(   Ns   Some output has been sentc            s#   | d g      t  d   d  S(   Ns   200 OKs    This should be caught by handler(   R3   (   R   R   (   t   MSG(    s"   lib/python2.7/test/test_wsgiref.pyR     s    s   Status: 200 OK

R3   i(   R   R   R@   R   R*   R   R(   R   (   R   R   R   (    (   R   s"   lib/python2.7/test/test_wsgiref.pyt   testErrorAfterOutput  s    	c   	      C   sY  d   } d } d } x=d D]5} | r2 d | p5 d } xd D]} xd D] } t d |  } t | _ | | _ | | _ | j |  |  j | | j j	    t d |  } t
 | _ | | _ | | _ | j |  | d	 k r|  j | j j	   d  qL |  j t j | | | f | j j	    | | | f | j j	   f  qL Wq? Wq Wd  S(   Nc         S   s   | d g   g  S(   Ns   200 OK(    (   R   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyR     s    sf   HTTP/%s 200 OK\r\nDate: \w{3}, [ 0123]\d \w{3} \d{4} \d\d:\d\d:\d\d GMT\r\n%sContent-Length: 0\r\n\r\ns%   Status: 200 OK
Content-Length: 0

s
   FooBar/1.0s   Server: %s
R&   s   1.0s   1.1s   HTTP/0.9s   HTTP/1.0s   HTTP/1.1Rz   (   s
   FooBar/1.0N(   s   1.0s   1.1(   s   HTTP/0.9s   HTTP/1.0s   HTTP/1.1(   Rs   R   RI   t   origin_servert   http_versiont   server_softwareR   R@   R   R*   RO   RL   t   reR:   (	   R   R   t   stdpatt   shortpatt   sswt   swRA   t   protoR   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   testHeaderFormats  s.    							"c            sS   i t  d 6 d      f d   } t   } | j |  |  j  d t  d  S(   Nt   close_calleds   Some output has been sentc            s6   | d g      d t  f  f d     Y} |   S(   Ns   200 OKt   CrashyIterablec              s    e  Z d    Z   f d   Z RS(   c         s   s"   x t  r d Vt d   q Wd  S(   Nt   blahs    This should be caught by handler(   RO   R3   (   R   (    (    s"   lib/python2.7/test/test_wsgiref.pyt   __iter__)  s    	c            s   t    d <d  S(   NR   (   RO   (   R   (   t   side_effects(    s"   lib/python2.7/test/test_wsgiref.pyRp   .  s    (   R   R   R   Rp   (    (   R   (    s"   lib/python2.7/test/test_wsgiref.pyR   (  s   	(   t   object(   R   R   R   (   R   R   (    s"   lib/python2.7/test/test_wsgiref.pyR   &  s    (   RI   R   R   R@   RO   (   R   R   R   (    (   R   R   s"   lib/python2.7/test/test_wsgiref.pyt   testCloseOnError#  s    	(   R   R   R   R   R   R   R   R   R   R   R   R   R   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyR   {  s   			
					'			)c           C   s   t  j t  d  S(   N(   R   t   run_unittestR   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyt	   test_main7  s    t   __main__(&   t   unittestR    t   wsgiref.utilR   t   wsgiref.headersR   t   wsgiref.handlersR   R   t   wsgirefR   t   wsgiref.validateR   t   wsgiref.simple_serverR   R   R	   R
   t   SocketServerR   R   R   R'   R   R   R   R   R%   R2   R>   R?   RP   R   R   R   R   R   R   (    (    (    s"   lib/python2.7/test/test_wsgiref.pyt   <module>   s6   
		%*8	