Ñò
÷ÿKc           @   s¼   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 d  d k l Z l Z d  d k l Z d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   TestApp(   t   RegistryManager(   t   RoutesMiddleware(   t   requestt   url(   t   https(   t   WSGIController(   t   ControllerWrapt   SetupCacheGlobal(   t   TestWSGIControllert   HttpsControllerc           B   s_   e  Z e d  ƒ d „  ƒ Z e d „  ƒ d „  ƒ Z e d „  ƒ d „  ƒ Z e ƒ  d „  ƒ Z RS(   s   /pylonsc         C   s   d S(   Ns
   index page(    (   t   self(    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   index   s    c           C   s   t  d  d d d ƒ S(   t
   controllert   autht   actiont   login(   R   (    (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   <lambda>   s    c         C   s   d S(   Ns   login2 page(    (   R   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   login2   s    c           C   s   t  i S(    (   R   R   (    (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyR      s    c         C   s   d S(   Ns   secure page(    (   R   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   secure   s    c         C   s   d S(   Ns   get page(    (   R   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   get   s    (   t   __name__t
   __module__R   R   R   R   R   (    (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyR
      s   t   TestHttpsDecoratorc           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s¬   t  i |  ƒ d d k l } | ƒ  } | i d ƒ | i d ƒ | i d ƒ | i d ƒ t t ƒ } t | |  i d t	 ƒ} t
 | | ƒ } t | ƒ } t | ƒ |  _ d  S(   Niÿÿÿÿ(   t   Mappers   /:actions   /:action/:ids   /:controller/:action/:ids   /:controller/:actiont   setup_cache(   R	   t   setUpt   routesR   t   connectR   R
   R   t   environt   FalseR   R   R    t   app(   R   R   t   mapR   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyR       s    	c         C   s   d |  i  d d <|  i i d d d ƒ} | i i d ƒ d j p t ‚ d	 |  i  d
 <|  i i d d d ƒ} d | i j p t ‚ d | j p t ‚ d  S(   NR   s   pylons.routes_dictR   s   /indext   statusi.  t   locations   https://localhost/pylonsR   s   wsgi.url_schemeiÈ   s
   index page(   R   R   R   t   header_dictt   AssertionError(   R   t   response(    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   test_https_explicit_path.   s    c         C   s-   d |  i  d d <|  i i d d d ƒ} d  S(   NR   s   pylons.routes_dictR   s   /indexR!   i•  (   R   R   t   post(   R   R%   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   test_https_disallows_post:   s    c         C   s   d |  i  d d <|  i i d d d ƒ} | i i d ƒ d j p t ‚ d	 |  i  d
 <|  i i d d d ƒ} d | i j p t ‚ d | j p t ‚ d  S(   NR   s   pylons.routes_dictR   s   /login2R!   i.  R"   s   https://localhost/auth/loginR   s   wsgi.url_schemeiÈ   s   login2 page(   R   R   R   R#   R$   (   R   R%   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   test_https_callable>   s    c         C   s   d |  i  d d <|  i i d d d ƒ} | i i d ƒ d j p t ‚ d	 |  i  d
 <|  i i d d d ƒ} d | i j p t ‚ d | j p t ‚ d  S(   NR   s   pylons.routes_dictR   s   /secureR!   i.  R"   s   https://localhost/secureR   s   wsgi.url_schemeiÈ   s   secure page(   R   R   R   R#   R$   (   R   R%   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   test_https_callable_currentJ   s    c         C   s   d |  i  d d <|  i i d d d ƒ} | i i d ƒ d j p t ‚ d	 |  i  d
 <|  i i d d d ƒ} d | i j p t ‚ d | j p t ‚ d  S(   NR   s   pylons.routes_dictR   s   /getR!   i.  R"   s   https://localhost/getR   s   wsgi.url_schemeiÈ   s   get page(   R   R   R   R#   R$   (   R   R%   (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   test_https_redirect_to_selfV   s    (   R   R   R   R&   R(   R)   R*   R+   (    (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyR      s   					N(   t   paste.fixtureR    t   paste.registryR   t   routes.middlewareR   t   pylonsR   R   t   pylons.decorators.secureR   t   pylons.controllersR   t   pylons.testutilR   R   t   __init__R	   R
   R   (    (    (    sQ   /Users/ben/Programming/Python/pylons-dev/tests/test_units/test_decorator_https.pyt   <module>   s   