%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/hyperlink/test/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/hyperlink/test/__pycache__/test_scheme_registration.cpython-312.pyc

�

G�_���^�ddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
Gd�d	e�Zy
)�)�unicode_literals)�cast�)�_url�)�HyperlinkTestCase)�register_scheme�URL�
DecodedURLc�B�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�TestSchemeRegistrationc�|�ttj�|_t	tj
�|_y�N)�dictr�SCHEME_PORT_MAP�_orig_scheme_port_map�set�NO_NETLOC_SCHEMES�_orig_no_netloc_schemes��selfs �I/usr/lib/python3/dist-packages/hyperlink/test/test_scheme_registration.py�setUpzTestSchemeRegistration.setUps(��%)�$�*>�*>�%?��"�'*�4�+A�+A�'B��$�c�X�|jt_|jt_yr)rrrrrrs r�tearDownzTestSchemeRegistration.tearDowns��#�9�9���!%�!=�!=��rc��tddd��tjd�}|jdk(sJ�|jdk(sJ�|j
dusJ�tjd�}|j
d��}|j�dk(sJ�tjd	�}|j�dk(sJ�td
d��td
�
�}|j
d��}|j�dk(sJ�y)N�deltronTi���uses_netloc�default_portzdeltron://example.comzdeltron:zexample.com)�hostzdeltron://example.com:3030�nonetroni��r!��schemeznonetron://example.com)r	r
�	from_textr&�portr �replace�to_text)r�u1�u2�u3�u4s     r�test_register_scheme_basicz1TestSchemeRegistration.test_register_scheme_basics����	�t�$�G�
�]�]�2�
3���y�y�I�%�%�%��w�w�$�����~�~��%�%�%��]�]�:�
&��
�Z�Z�]�Z�
+���z�z�|�6�6�6�6��]�]�7�
8���z�z�|�6�6�6�6��
��6�
�
�
#��
�Z�Z�]�Z�
+���z�z�|�7�7�7�7rc��tdd��td��}|jd��}|j�dk(sJ�y)N�	noloctronF�r r%)�example�path)r4znoloctron:example/path)r	r
r)r*)rr.s  r�test_register_no_netloc_schemez5TestSchemeRegistration.test_register_no_netloc_scheme-s<�����7�
��
$��
�Z�Z�0�Z�
1���z�z�|�7�7�7�7rc�t�|jt�5tddd��ddd�y#1swYyxYw)N�
badnetloclessF�r)�assertRaises�
ValueErrorr	rs r�!test_register_no_netloc_with_portz8TestSchemeRegistration.test_register_no_netloc_with_port4s5��
�
�
�z�
*�	P��O��Q�O�	P�	P�	P�s�.�7c	�(�|jt�5tdttd���ddd�|jt�5tdttt����ddd�y#1swY�KxYw#1swYyxYw)N�	badnetlocr2�r9r:r	r�bool�objectrs r�test_invalid_uses_netlocz/TestSchemeRegistration.test_invalid_uses_netloc9sz��
�
�
�z�
*�	G��K�T�$��5E�F�	G�
�
�
�z�
*�	K��K�T�$���5I�J�	K�	K�	G�	G��	K�	K�s�A<�$B�<B�Bc	��|jt�5tdttt����ddd�y#1swYyxYw)N�lolr2r>rs r�!test_register_invalid_uses_netlocz8TestSchemeRegistration.test_register_invalid_uses_netloc@s<��
�
�
�z�
*�	E��E�t�D�&�(�/C�D�	E�	E�	E���$A�Ac	��|jt�5tdttt����ddd�y#1swYyxYw)N�noper$r>rs r�test_register_invalid_portz1TestSchemeRegistration.test_register_invalid_portEs<��
�
�
�z�
*�	G��F��d�F�H�1E�F�	G�	G�	G�rEc���tdd��tjd�}tjd�}|jd�dgk(sJ�|jd�dgk(sJ�y)	N�keepplusF)�query_plus_is_spacezkeepplus://example.com/?q=a+bzhttps://example.com/?q=a+b�qza+bza b)r	rr'�get)r�plus_is_not_space�
plus_is_spaces   r�"test_register_no_quote_plus_schemez9TestSchemeRegistration.test_register_no_quote_plus_schemeJsi���
��>�&�0�0�+�
��#�,�,�-I�J�
� �$�$�S�)�e�W�4�4�4�� � ��%�%��0�0�0rN)�__name__�
__module__�__qualname__rrr/r5r;rArDrHrP�rrr
r
s4��C�
>�
8�.8�P�
K�E�
G�
1rr
N)�
__future__r�typingr�r�commonrr	r
rr
rTrr�<module>rYs(��'���%�3�3�G1�.�G1r

Zerion Mini Shell 1.0