https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/django/contrib/gis/geoip/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/contrib/gis/geoip/tests.pyc
�
r�\c@s�ddlmZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl	m
Z
er�d	d
lmZmZner�ddlmZneeo�eed
d�d�de
jfd��Y�ZdS(i����(tunicode_literalsN(tsettings(tHAS_GEOS(t	HAS_GEOIP(tunittest(t
skipUnless(tsixi(tGeoIPtGeoIPExceptioni(tGEOSGeometryu
GEOIP_PATHu4GeoIP is required along with the GEOIP_PATH setting.t	GeoIPTestcBsDeZd�Zd�Zd�Zeed�d��Zd�ZRS(c
Cs[t�}tj}t|d�}tj|d�}xI|||fD]8}|jtt|j��|jtt|j��qCWt	j
j|d�}t	j
j|d�}t|dd�}|jd|j�t|dd�}	|jd|	j�d}
x[|
D]S}|j
ttd
|�t|tj�r7t}nt}|j
|t|d�qWdS(
uTesting GeoIP initialization.iuGeoLiteCity.datu	GeoIP.dattcountryutcityiufoog�(\��u.@tcacheN(iufoog�(\��u.@(RRt
GEOIP_PATHtopentassertEqualtTruetboolt_countryt_citytostpathtjointNonetassertRaisesRt
isinstanceRtstring_typest	TypeError(
tselftg1Rtg2tg3tgRtcntrytg4tg5t
bad_paramstbadte((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyttest01_inits(		
	cCsktdd�}|jt|jd�|jt|jd�|jt|jd�|jt|jt�dS(u'Testing GeoIP query parameter checking.Ru<foo>u
google.comu	yahoo.comiN(RRRRtcoordsRtcountry_codetcountry_name(Rtcntry_g((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyttest02_bad_query;s
cCs�tdd�}d}d}x�||fD]�}x6|j|j|jfD]}|jd||��qGWx6|j|j|jfD]}|jd||��q�W|jidd6dd6|j|��q(Wd	S(
u'Testing GeoIP country querying methods.Ru<foo>uwww.google.comu12.215.42.19uUSu
United Statesucountry_codeucountry_nameN(	RR*tcountry_code_by_addrtcountry_code_by_nameRR+tcountry_name_by_addrtcountry_name_by_nameR(RR!tfqdntaddrtquerytfunc((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyttest03_countryFsuGeos is requiredcCs�tdd�}d}d}x�||fD]�}x6|j|j|jfD]}|jd||��qGWx6|j|j|jfD]}|jd||��q�W|jidd6dd6|j|��|j	|�}|jd	|d
�|jd|d�|jd
|d�|jd|d�|j
|�}|jt|t
��d\}}	|j|�}
|
d|
df}
x]|j|j|�|j|�|
fD]4}|j||dd�|j|	|dd�q�Wq(WdS(u$Testing GeoIP city querying methods.Ru<foo>u128.249.1.1utmc.eduuUSu
United Statesucountry_codeucountry_nameuUSAu
country_code3uHoustonucityuTXuregioni�u	area_codeg�l��W�g��4�8�=@iiiN(g�l��W�g��4�8�=@(RR*R.R/RR+R0R1RRtgeost
assertTrueRR	tlat_lonttupleR)tlon_lattassertAlmostEqual(RR!R3R2R4R5tdtgeomtlontlatR9ttup((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyttest04_cityUs..cCsSt�}|jd�}|jd|d�|jd�}|jd|d�dS(u<Testing that GeoIP strings are properly encoded, see #16553.uwww.osnabrueck.deu
Osnabrückucityu200.7.49.81uCuraçaoucountry_nameN(RRRR(RR!R=((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyttest05_unicode_responsets
	(	t__name__t
__module__R(R-R6RRRBRC(((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyR
s
			(t
__future__RRtdjango.confRtdjango.contrib.gis.geosRtdjango.contrib.gis.geoipRtdjango.utilsRtdjango.utils.unittestRRtRRR7R	tgetattrRtTestCaseR
(((s@/tmp/pip-install-XxeQeY/django/django/contrib/gis/geoip/tests.pyt<module>s		

https://t.me/AnonymousX5 - 2025