Ņō
ž?Tū  c           @   sī   d  d k  Z d  d k i i Z d  d k l Z d  d k l	 Z	 d  d k
 l Z d  d k l Z l Z d  d k l Z d d k l Z l Z d	 e f d
     YZ d e f d     YZ d e f d     YZ d e f d     YZ d   Z d S(   i˙˙˙˙N(   t   Manager(   t   handler(   t   BaseComponent(   t
   BaseServert
   Controller(   t
   Dispatcheri   (   t   urlopent   urljoint   PrefixingDispatcherc           B   s2   e  Z d  Z d   Z e d d d d    Z RS(   s3   Forward to another Dispatcher based on the channel.c         C   s   t  t |   i d |  d  S(   Nt   channel(   t   superR   t   __init__(   t   selfR	   (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR      s    t   requestt   priorityg      đ?c         C   s5   | i  i d  } t d |  i |  } | | _  d  S(   Nt   /s   /%s/(   t   patht   stripR   R	   (   R   t   eventR   t   responseR   (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyt   _on_request   s    (   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR      s   	t	   DummyRootc           B   s   e  Z d  Z d   Z RS(   R   c         C   s   d S(   Ns   Not used(    (   R   (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyt   index   s    (   R   R   R	   R   (    (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR      s   t   Root1c           B   s   e  Z d  Z d   Z RS(   s   /site1c         C   s   d S(   Ns   Hello from site 1!(    (   R   (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR   '   s    (   R   R   R	   R   (    (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR   #   s   t   Root2c           B   s   e  Z d  Z d   Z RS(   s   /site2c         C   s   d S(   Ns   Hello from site 2!(    (   R   (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR   /   s    (   R   R   R	   R   (    (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyR   +   s   c    	      C   s  t    }  t d d d } | i |   t d d  i |  t d d  i |  t   i |   t d d d } | i |   t d d  i |  t d d  i |  t   i |   t   i |   |  i   t	 | i
 i d d } | i   } d } | | j } | p t i d | f d | | f  h d t i   j p t i |  o t i |  n d d 6t i |  d 6} d h | d 6} t t i |    n d  } } t	 | i
 i d d } | i   } d } | | j } | p t i d | f d | | f  h d t i   j p t i |  o t i |  n d d 6t i |  d 6} d h | d 6} t t i |    n d  } } d  S(   Ni    R	   t   site1t	   localhostt   site2t   timeouti   s   Hello from site 1!s   ==s   %(py0)s == %(py3)st   st   py0t   py3s   assert %(py5)st   py5s   Hello from site 2!(   s	   localhosti    (   s   ==(   s   %(py0)s == %(py3)s(   s   ==(   s   %(py0)s == %(py3)s(   R    R   t   registerR   R   R   R   R   t   startR   t   httpt   baset   readt
   @pytest_art   _call_reprcomparet   @py_builtinst   localst   _should_repr_global_namet	   _safereprt   AssertionErrort   _format_explanationt   None(	   t   managert   server1t   server2t   fR    t   @py_assert2t   @py_assert1t   @py_format4t   @py_format6(    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyt
   test_disps3   s>    	
   o   
   o   (   t   __builtin__R+   t   _pytest.assertion.rewritet	   assertiont   rewriteR)   t   circuits.core.managerR    t   circuits.core.handlersR   t   circuits.core.componentsR   t   circuits.webR   R   t#   circuits.web.dispatchers.dispatcherR   t   helpersR   R   R   R   R   R   R:   (    (    (    s4   /home/prologic/work/circuits/tests/web/test_disps.pyt   <module>   s     