Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.117.75.102
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_cookie.pyo
�
?��cc@s|ddlmZmZmZddlZddlZddlZdejfd��YZd�Z	e
dkrxe	�ndS(i����(trun_unittesttrun_doctesttcheck_warningsNtCookieTestscBsteZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(c	Csmidd6idd6dd6d6dd	6d
d6idd6id
d6d6dd	6dd6idd6idd6d6dd	6dd6idd6idd6dd6dd6dd6d6dd	6djd%�d6g}x�|D]�}tj�}|j|d�|jt|�|d	�|j|jd$d�|d�x;t|dj��D]#\}}|j||j	|�q>Wq�WdS(&Nschips=ahoy; vienna=fingertdatatahoytchipstfingertviennatdicts,<SimpleCookie: chips='ahoy' vienna='finger'>treprs0Set-Cookie: chips=ahoy
Set-Cookie: vienna=fingertoutputs)keebler="E=mc2; L=\"Loves\"; fudge=\012;"sE=mc2; L="Loves"; fudge=
;tkeeblers5<SimpleCookie: keebler='E=mc2; L="Loves"; fudge=\n;'>s5Set-Cookie: keebler="E=mc2; L=\"Loves\"; fudge=\012;"s
keebler=E=mc2sE=mc2s<SimpleCookie: keebler='E=mc2'>sSet-Cookie: keebler=E=mc2sa=b; c=[; d=r; f=htbtat[tctrtdthtfs'<SimpleCookie: a='b' c='[' d='r' f='h'>s
sSet-Cookie: a=bsSet-Cookie: c=[sSet-Cookie: d=rsSet-Cookie: f=htsep(sSet-Cookie: a=bsSet-Cookie: c=[sSet-Cookie: d=rsSet-Cookie: f=h(
tjointCookietSimpleCookietloadtassertEqualR
Rtsortedt	iteritemstvalue(tselftcasestcasetCtktv((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt
test_basics8


#
 #cCstj�}|jd�|j|djd�|j|ddd�|j|ddd�|j|jdg�d�|j|j�d	�|j|jdg�d
�tj�}|jd�|j|ddd
�tj�}|jd�|j|ddd�dS(Ns/Customer="WILE_E_COYOTE"; Version=1; Path=/acmetCustomert
WILE_E_COYOTEtversiont1tpaths/acmes0Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acmes�
        <script type="text/javascript">
        <!-- begin hiding
        document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme; Version=1";
        // end hiding -->
        </script>
        s�
        <script type="text/javascript">
        <!-- begin hiding
        document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme";
        // end hiding -->
        </script>
        s3Customer="W"; expires=Wed, 01 Jan 2010 00:00:00 GMTtexpiressWed, 01 Jan 2010 00:00:00 GMTs1Customer="W"; expires=Wed, 01 Jan 98 00:00:00 GMTsWed, 01 Jan 98 00:00:00 GMT(RRRRRRt	js_output(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt	test_load7s&


cCs6tj�}d|d<|j|jdg�d�dS(Nssome,funky;stufftvals(Set-Cookie: val="some\054funky\073stuff"(RRRR(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_extended_encodeZs
cCsEtjd�}t|dd<t|dd<|j|j�d�dS(NsCustomer="WILE_E_COYOTE"R%tsecurethttponlys6Set-Cookie: Customer="WILE_E_COYOTE"; httponly; secure(RRtTrueRR(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_set_secure_httponly_attrsbs
cCsGtj�}|jd�|j|dd�|j|dd�dS(Nseggs=scrambled; Path=/baconteggsR0R/(RRRtassertFalse(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt)test_secure_httponly_false_if_not_presentis
cCsGtj�}|jd�|j|dd�|j|dd�dS(Ns-eggs=scrambled; httponly; secure; Path=/baconR3R0R/(RRRt
assertTrue(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt$test_secure_httponly_true_if_presentos
cCswtj�}|jd�|j|dd�|j|dd�|j|ddd�|j|ddd�dS(Ns5eggs=scrambled; httponly=foo; secure=bar; Path=/baconR3R0R/tfootbar(RRRR6R(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt'test_secure_httponly_true_if_have_valuevs
cCs3tj�}|jd�|j|j�d�dS(Ns-cookie=with; invalid; version; second=cookie;s2Set-Cookie: cookie=with
Set-Cookie: second=cookie(RRRRR(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_bad_attrs�s
cCs3tj�}|jd�|j|j�d�dS(Ns=eggs  =  scrambled  ;  secure  ;  path  =  bar   ; foo=foo   sASet-Cookie: eggs=scrambled; Path=bar; secure
Set-Cookie: foo=foo(RRRRR(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_extra_spaces�s
cCsdtj�}|jd�|j|djd�|j|ddd�|j|ddd�dS(Ns3Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"R%R&R'R(R)s/acme(RRRRR(RR!((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_quoted_meta�s

cCsZtj�}xGdD]?}|j|�|jt|�i�|j|j�d�qWdS(Ns]foo=xs[foo=xs
blah]foo=xs
blah[foo=xt(s]foo=xs[foo=xs
blah]foo=xs
blah[foo=x(RRRRR	R(RR!ts((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_invalid_cookies�s


cCs�d}d|}tj�}|j|�|j|j�|�xOttjd�D]:}tjtj	|d|��}|j|j�|�qSWdS(Ns/Customer="WILE_E_COYOTE"; Path=/acme; Version=1sSet-Cookie: %sitprotocol(
RRRRRtrangetpickletHIGHEST_PROTOCOLtloadstdumps(Rtrawdatatexpected_outputR!tprototC1((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyttest_pickle�s

(t__name__t
__module__R$R,R.R2R5R7R:R;R<R=R@RK(((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyR	s	,	#									cCsCtt�tjdk	r?tdtf��tt�WdQXndS(Ns).+Cookie class is insecure; do not use it(RRRt__doc__tNoneRtDeprecationWarningR(((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt	test_main�s


t__main__(ttest.test_supportRRRtunittestRRCtTestCaseRRQRL(((s7/usr/local/python-2.7/lib/python2.7/test/test_cookie.pyt<module>s�	
© 2025 GrazzMean