
                            S r SSKJr  SSKrSSKJrJr  SSKr\" SS5      r\" S5      r	 " S S	5      r
 " S
 S\
5      rg)z
Test what happens if Python was built without SSL

* Everything that does not involve HTTPS should still work
* HTTPS requests must fail with an error that points at the ssl module
    )annotationsN)ImportBlockerModuleStashssl_sslurllib3c                  <    \ rS rSr\SS j5       r\SS j5       rSrg)TestWithoutSSL   c                    [         R                  R                  SS 5        [         R                  R                  SS 5        [        R	                  5         [         R
                  R                  S[        5        g )Nr   r   r   )sysmodulespopmodule_stashstash	meta_pathinsertssl_blockerclss    7platform/gsutil/third_party/urllib3/test/test_no_ssl.pysetup_classTestWithoutSSL.setup_class   sF    t$%Q,    c                r    [         R                  R                  [        5        [        R                  5         g )N)r   r   remover   r   r   r   s    r   teardown_classTestWithoutSSL.teardown_class   s     [)r    NreturnNone)__name__
__module____qualname____firstlineno__classmethodr   r   __static_attributes__r   r   r   r
   r
      s(    - -  r   r
   c                  (    \ rS rSrSS jrSS jrSrg)TestImportWithoutSSL"   c                t    [         R                  " [        5         SS KnS S S 5        g ! , (       d  f       g = fNr   )pytestraisesImportErrorr   )selfr   s     r   test_cannot_import_ssl+TestImportWithoutSSL.test_cannot_import_ssl#   s    ]];' (''s   )
7c                    SS K ng r-   )r   )r1   r   s     r   test_import_urllib3(TestImportWithoutSSL.test_import_urllib3'   s    r   r   Nr    )r#   r$   r%   r&   r2   r5   r(   r   r   r   r*   r*   "   s    r   r*   )__doc__
__future__r   r   testr   r   r.   r   r   r
   r*   r   r   r   <module>r:      sD    # 
 + E6*9% > r   