
                        n    d dl mZ d dlZd dlmZ d dlZd dlmZ d dlm	Z	  G d de
      Z G d d	      Zy)
    )annotationsN)mock)HTTPConnectionPool)EmptyPoolErrorc                      e Zd ZdZy)BadErrorz$
    This should not be raised.
    N)__name__
__module____qualname____doc__     Bplatform/gsutil/third_party/urllib3/test/test_queue_monkeypatch.pyr   r      s    r   r   c                      e Zd ZdZddZy)TestMonkeypatchResistancez
    Test that connection pool works even with a monkey patched Queue module,
    see obspy/obspy#1599, psf/requests#3742, urllib3/urllib3#1061.
    c                d   t         j                  j                  t        dt              5  t        dd      5 }|j                          t        j                  t              5  |j                  d       d d d        d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)NEmpty	localhostT)hostblockr   )timeout)
r   patchobjectqueuer   r   	_get_connpytestraisesr   )selfhttps     r   test_queue_monkeypatchingz3TestMonkeypatchResistance.test_queue_monkeypatching   sw    ZZugx8#DAT ]]>2NN1N- 3 B 98 32 BA 98s:   B&*B"B5B=B&BBB#	B&&B/N)returnNone)r	   r
   r   r   r    r   r   r   r   r      s    
.r   r   )
__future__r   r   unittestr   r   urllib3r   urllib3.exceptionsr   	Exceptionr   r   r   r   r   <module>r(      s-    "    & -y . .r   