ó
O'—^c           @  sj   d  d l  m Z d  d l m Z d  d l m Z d d l m Z d d l m	 Z	 d e f d „  ƒ  YZ
 d	 S(
   iÿÿÿÿ(   t   unicode_literals(   t   TestCase(   t   ValidationErrori   (   t   oauth2_settings(   t   validate_urist   TestValidatorsc           B  s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C  s   d } t  | ƒ d  S(   Nu=   http://example.com/ http://example.it/?key=val http://example(   R   (   t   selft	   good_uris(    (    sG   /tmp/pip-unpacked-wheel-ndW12l/oauth2_provider/tests/test_validators.pyt   test_validate_good_uris   s    c         C  s#   d d g t  _ d } t | ƒ d  S(   Nu	   my-schemeu   httpu*   my-scheme://example.com http://example.com(   R   t   ALLOWED_REDIRECT_URI_SCHEMESR   (   R   R   (    (    sG   /tmp/pip-unpacked-wheel-ndW12l/oauth2_provider/tests/test_validators.pyt   test_validate_custom_uri_scheme   s    c         C  s   d } t  | ƒ d  S(   Nu-   http://example
http://example	http://example(   R   (   R   R   (    (    sG   /tmp/pip-unpacked-wheel-ndW12l/oauth2_provider/tests/test_validators.pyt#   test_validate_whitespace_separators   s    c         C  sh   d } |  j  t t | ƒ d } |  j  t t | ƒ d } |  j  t t | ƒ d } |  j  t t | ƒ d  S(   Nu   http://example.com/#fragmentu   http:/example.comu   my-scheme://example.comu   sdklfsjlfjljdflksjlkfjsdkl(   t   assertRaisesR   R   (   R   t   bad_uri(    (    sG   /tmp/pip-unpacked-wheel-ndW12l/oauth2_provider/tests/test_validators.pyt   test_validate_bad_uris   s    (   t   __name__t
   __module__R   R
   R   R   (    (    (    sG   /tmp/pip-unpacked-wheel-ndW12l/oauth2_provider/tests/test_validators.pyR   
   s   			N(   t
   __future__R    t   django.testR   t   django.core.validatorsR   t   settingsR   t
   validatorsR   R   (    (    (    sG   /tmp/pip-unpacked-wheel-ndW12l/oauth2_provider/tests/test_validators.pyt   <module>   s
   