a
    ù!f°  ã                   @   s   d dl Z G dd„ de jƒZdS )é    Nc                   @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚTestConnectionc                 C   s   ddl m} |S )Nr   )Ú
Connection)Zgcloud.storage.connectionr   )Úselfr   © r   ú_/var/www/html/python-backend/venv/lib/python3.9/site-packages/gcloud/storage/test_connection.pyÚ_getTargetClass   s    zTestConnection._getTargetClassc                 O   s   |   ¡ |i |¤ŽS )N)r   )r   ÚargsÚkwr   r   r   Ú_makeOne   s    zTestConnection._makeOnec                 C   s4   |   ¡ }d |jd|jdg¡}|  | d¡|¡ d S )Nú/ÚstorageÚfooú/foo)r
   ÚjoinÚAPI_BASE_URLÚAPI_VERSIONÚassertEqualÚbuild_api_url)r   ÚconnÚURIr   r   r   Ú(test_build_api_url_no_extra_query_params   s    üz7TestConnection.test_build_api_url_no_extra_query_paramsc              	   C   s”   ddl m} ddl m} |  ¡ }| dddi¡}||ƒ\}}}}}	|  d||f |j¡ |  |d d	d
|jdg¡¡ t	||ƒƒ}
|  |
d d¡ d S )Nr   )Ú	parse_qsl)Úurlsplitr   ÚbarZbazz%s://%sr   Ú r   r   )
Zsix.moves.urllib.parser   r   r
   r   r   r   r   r   Údict)r   r   r   r   ÚuriÚschemeÚnetlocÚpathÚqsÚ_Zparmsr   r   r   Ú'test_build_api_url_w_extra_query_params%   s    ÿz6TestConnection.test_build_api_url_w_extra_query_paramsN)Ú__name__Ú
__module__Ú__qualname__r   r
   r   r"   r   r   r   r   r      s   
r   )Z	unittest2ZTestCaser   r   r   r   r   Ú<module>   s   