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/flatpages/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/contrib/flatpages/tests/test_views.pyc
�
r�\c@s ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZedd	d
ddej
jej
je�d�fdd�de
fd��Y�Zededd	d
ddej
jej
je�d�fdd�de
fd��Y�ZdS(i����N(tsettings(tUser(tskipIfCustomUser(tFlatPage(tTestCase(toverride_settingst	LOGIN_URLs/accounts/login/tMIDDLEWARE_CLASSESs)django.middleware.common.CommonMiddlewares4django.contrib.sessions.middleware.SessionMiddlewares)django.middleware.csrf.CsrfViewMiddlewares7django.contrib.auth.middleware.AuthenticationMiddlewares4django.contrib.messages.middleware.MessageMiddlewaret
TEMPLATE_DIRSt	templatestSITE_IDitFlatpageViewTestscBsVeZddgZdZd�Zd�Zed��Zd�Zd�Z	d�Z
RS(	tsample_flatpagestexample_sites#django.contrib.flatpages.tests.urlscCs9|jjd�}|j|jd�|j|d�dS(s'A flatpage can be served through a views/flatpage_root/flatpage/i�s<p>Isn't it flat!</p>N(tclienttgettassertEqualtstatus_codetassertContains(tselftresponse((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyttest_view_flatpagescCs)|jjd�}|j|jd�dS(s=A non-existent flatpage raises 404 when served through a views /flatpage_root/no_such_flatpage/i�N(RRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyttest_view_non_existent_flatpage#scCs�|jjd�}|j|d�tjjddd�|jjdddd�|jjd�}|j|jd�|j	|d	�d
S(s;A flatpage served through a view can require authentications/flatpage_root/sekrit/s,/accounts/login/?next=/flatpage_root/sekrit/ttestuserstest@example.comts3krittusernametpasswordi�s<p>Isn't it sekrit!</p>N(
RRtassertRedirectsRtobjectstcreate_usertloginRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt test_view_authenticated_flatpage(scCs)|jjd�}|j|jd�dS(sAA fallback flatpage won't be served if the middleware is disableds
/flatpage/i�N(RRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyttest_fallback_flatpage3scCs)|jjd�}|j|jd�dS(sMA non-existent flatpage won't be served if the fallback middlware is disableds/no_such_flatpage/i�N(RRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt#test_fallback_non_existent_flatpage8scCsytjjdddddddtdt�}|jjtj�|jj	d	�}|j
|jd
�|j|d�dS(
sEA flatpage with special chars in the URL can be served through a viewturls/some.very_special~chars-here/ttitlesA very special pagetcontentsIsn't it special!tenable_commentstregistration_requireds,/flatpage_root/some.very_special~chars-here/i�s<p>Isn't it special!</p>N(
RRtcreatetFalsetsitestaddRR
RRRRR(RtfpR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt test_view_flatpage_special_chars=s	(t__name__t
__module__tfixturesturlsRRRRR R!R,(((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyR
s				tAPPEND_SLASHtFlatpageViewAppendSlashTestscBsGeZddgZdZd�Zd�Zd�Zd�Zd�ZRS(RR
s#django.contrib.flatpages.tests.urlscCs,|jjd�}|j|ddd�dS(s>A flatpage can be served through a view and should add a slashs/flatpage_root/flatpages/flatpage_root/flatpage/Ri-N(RRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyttest_redirect_view_flatpageascCs)|jjd�}|j|jd�dS(sXA non-existent flatpage raises 404 when served through a view and should not add a slashs/flatpage_root/no_such_flatpagei�N(RRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt(test_redirect_view_non_existent_flatpagefscCs)|jjd�}|j|jd�dS(s\A fallback flatpage won't be served if the middleware is disabled and should not add a slashs	/flatpagei�N(RRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyttest_redirect_fallback_flatpagekscCs)|jjd�}|j|jd�dS(shA non-existent flatpage won't be served if the fallback middlware is disabled and should not add a slashs/no_such_flatpagei�N(RRRR(RR((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt,test_redirect_fallback_non_existent_flatpagepscCsltjjdddddddtdt�}|jjtj�|jj	d	�}|j
|d
dd�d
S(s\A flatpage with special chars in the URL can be served through a view and should add a slashR"s/some.very_special~chars-here/R#sA very special pageR$sIsn't it special!R%R&s+/flatpage_root/some.very_special~chars-heres,/flatpage_root/some.very_special~chars-here/Ri-N(RRR'R(R)R*RR
RRR(RR+R((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt)test_redirect_view_flatpage_special_charsus	(	R-R.R/R0R3R4R5R6R7(((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyR2Ms				(s)django.middleware.common.CommonMiddlewares4django.contrib.sessions.middleware.SessionMiddlewares)django.middleware.csrf.CsrfViewMiddlewares7django.contrib.auth.middleware.AuthenticationMiddlewares4django.contrib.messages.middleware.MessageMiddleware(s)django.middleware.common.CommonMiddlewares4django.contrib.sessions.middleware.SessionMiddlewares)django.middleware.csrf.CsrfViewMiddlewares7django.contrib.auth.middleware.AuthenticationMiddlewares4django.contrib.messages.middleware.MessageMiddleware(tostdjango.confRtdjango.contrib.auth.modelsRtdjango.contrib.auth.tests.utilsRtdjango.contrib.flatpages.modelsRtdjango.testRtdjango.test.utilsRtpathtjointdirnamet__file__RtTrueR2(((sK/tmp/pip-install-XxeQeY/django/django/contrib/flatpages/tests/test_views.pyt<module>s6$	4$	

https://t.me/AnonymousX5 - 2025