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 :  /lib64/python2.7/site-packages/django/contrib/sitemaps/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/contrib/sitemaps/tests/test_http.pyc
�
r�\c@s�ddlmZddlZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZddlmZddlmZmZd
dlmZmZdefd��YZdS(i����(tunicode_literalsN(tdate(tsettings(tSitemaptGenericSitemap(tSite(tImproperlyConfigured(toverride_settings(t
skipUnless(tlocalize(tupath(tactivatet
deactivatei(t	TestModeltSitemapTestsBasetHTTPSitemapTestscBseZd�Zedejjejjee	��d�f�d��Z
d�Zd�Zedejjejjee	��d�f�d��Z
eejd�ede�d	���Zd
�Zedejkd�d
��Zd�Zd�Zd�Zd�ZRS(cCs?|jjd�}d|j}|j|jjd�|�dS(u&A simple sitemap index can be renderedu/simple/index.xmlu�<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>%s/simple/sitemap-simple.xml</loc></sitemap>
</sitemapindex>
uutf-8N(tclienttgettbase_urltassertXMLEqualtcontenttdecode(tselftresponsetexpected_content((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_simple_sitemap_indexs
t
TEMPLATE_DIRSu	templatescCs?|jjd�}d|j}|j|jjd�|�dS(u=A simple sitemap index can be rendered with a custom templateu/simple/custom-index.xmlu�<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a customised template -->
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>%s/simple/sitemap-simple.xml</loc></sitemap>
</sitemapindex>
uutf-8N(RRRRRR(RRR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyt test_simple_sitemap_custom_indexs
cCsK|jjd�}d|jtj�f}|j|jjd�|�dS(u(A simple sitemap section can be renderedu/simple/sitemap-simple.xmlu�<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>%s/location/</loc><lastmod>%s</lastmod><changefreq>never</changefreq><priority>0.5</priority></url>
</urlset>
uutf-8N(RRRRttodayRRR(RRR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_simple_sitemap_section.scCsK|jjd�}d|jtj�f}|j|jjd�|�dS(u A simple sitemap can be renderedu/simple/sitemap.xmlu�<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>%s/location/</loc><lastmod>%s</lastmod><changefreq>never</changefreq><priority>0.5</priority></url>
</urlset>
uutf-8N(RRRRRRRR(RRR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_simple_sitemap8scCsK|jjd�}d|jtj�f}|j|jjd�|�dS(u7A simple sitemap can be rendered with a custom templateu/simple/custom-sitemap.xmlu<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a customised template -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>%s/location/</loc><lastmod>%s</lastmod><changefreq>never</changefreq><priority>0.5</priority></url>
</urlset>
uutf-8N(RRRRRRRR(RRR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_simple_custom_sitemapBsu#Internationalization is not enabledtUSE_L10NcCsgtd�|jdtd��|jjd�}|j|d�|j|dtj��t�dS(u8The priority value should not be localized (Refs #14164)ufru0,3g333333�?u/simple/sitemap.xmlu<priority>0.5</priority>u<lastmod>%s</lastmod>N(	RtassertEqualR	RRtassertContainsRRR(RR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_localized_priorityPs
cCsNttj_|jjd�}dtj�}|j|j	j
d�|�dS(Nu/simple/sitemap.xmlu�<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://testserver/location/</loc><lastmod>%s</lastmod><changefreq>never</changefreq><priority>0.5</priority></url>
</urlset>
uutf-8(tFalseRt_metat	installedRRRRRRR(RRR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_requestsite_sitemap^sudjango.contrib.sitesu'django.contrib.sites app not installed.cCs-tjj�j�|jtt�j�dS(u�
        Check we get ImproperlyConfigured if we don't pass a site object to
        Sitemap.get_urls and no Site objects exist
        N(RtobjectstalltdeletetassertRaisesRRtget_urls(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_sitemap_get_urls_no_site_1jscCs&ttj_|jtt�j�dS(u�
        Check we get ImproperlyConfigured when we don't pass a site object to
        Sitemap.get_urls if Site objects exists, but the sites framework is not
        actually installed.
        N(R$RR%R&R+RRR,(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_sitemap_get_urls_no_site_2tscCsQtitjj�d6�}d�}tt||j���}|j|�dS(ur
        Check to make sure that the raw item is included with each
        Sitemap.get_url() url result.
        uquerysetcSst|dt�S(Nuitem(t
isinstanceR
(turl((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pytis_testmodel�sN(RR
R(R)tmapR,t
assertTrue(Rttest_sitemapR1titem_in_url_info((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_sitemap_item}s	cCs?|jjd�}d|j}|j|jjd�|�dS(uL
        Check that a cached sitemap index can be rendered (#2713).
        u/cached/index.xmlu�<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>%s/cached/sitemap-simple.xml</loc></sitemap>
</sitemapindex>
uutf-8N(RRRRRR(RRR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_cached_sitemap_index�s
cCsP|jjd�}|j|dd�|jjd�}|j|dd�dS(Nu/simple/index.xmluX-Robots-Tagunoindex, noodp, noarchiveu/simple/sitemap.xml(RRR!(RR((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyttest_x_robots_sitemap�s(t__name__t
__module__RRtostpathtjointdirnameR
t__file__RRRRRRtUSE_I18NtTrueR#R'tINSTALLED_APPSR-R.R6R7R8(((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyRs 	
6	
	
6

						(t
__future__RR;tdatetimeRtdjango.confRtdjango.contrib.sitemapsRRtdjango.contrib.sites.modelsRtdjango.core.exceptionsRtdjango.test.utilsRtdjango.utils.unittestRtdjango.utils.formatsR	tdjango.utils._osR
tdjango.utils.translationRRtbaseR
RR(((sI/tmp/pip-install-XxeQeY/django/django/contrib/sitemaps/tests/test_http.pyt<module>s

https://t.me/AnonymousX5 - 2025