Current File : //opt/imh-python/lib/python2.7/test/test_cookielib.pyo
�
��Wc@sdZddlZddlZddlZddlZddlmZddlmZdefd��YZ	defd��YZ
d	fd
��YZd�Zd�Z
d
�Zdefd��YZdefd��YZdefd��YZed�Zedkrede�ndS(sTests for cookielib.py.i����N(tTestCase(ttest_supportt
DateTimeTestscBs,eZd�Zd�Zd�Zd�ZRS(cCs�ddlm}d}d}|j||�d�|j|||�d�|j||d|�d	�|j||d
|�d�|�}|d�}x1||fD]#}|j|d
d||f�q�WdS(Ni����(t	time2isozix+�<iis2002-04-19 14:36:40Zs2002-04-20 14:36:40Zis2002-04-21 14:36:40Zis2002-04-22 14:36:40Zi �s!^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$sbad time2isoz format: %s %si�Q(t	cookielibRtassertEqualtassertRegexpMatches(tselfRtbasetdaytaztbzttext((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_time2isozs		cseddlm��fd�}|j|d�d�|j|d	�d�|j|d
�d�dS(Ni����(t	http2timecstj�|��d S(Ni(ttimetgmtime(R(R(sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt
parse_date$ss01 Jan 2001i�iigs	03-Feb-20i�iis	03-Feb-98i�(i�iiiig(i�iiiig(i�iiiig(RRR(RR((Rsl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_http2time!s
c
Cs�ddlm}m}ddddddd	d
ddd
ddg
}d}||�}d}|j||d|||f�xq|D]i}|j||�||�|j||j��||j��|j||j��||j��q�WdS(Ni����(RRsThu, 03 Feb 1994 00:00:00 GMTs Thursday, 03-Feb-94 00:00:00 GMTs"Thursday, 03-Feb-1994 00:00:00 GMTs03 Feb 1994 00:00:00 GMTs03-Feb-94 00:00:00 GMTs03-Feb-1994 00:00:00 GMTs03-Feb-1994 00:00 GMTs03-Feb-1994 00:00s	03-Feb-94s03-Feb-1994s03 Feb 1994s  03   Feb   1994  0:00  s  03-Feb-1994  i�>P-s1994-02-03 00:00:00Zs%s  =>  '%s' (%s)(RRRRtlowertupper(RRRtteststtest_ttresulttexpectedts((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_http2time_formats/s.	
%c
Csoddlm}xXddddddd	d
ddg
D]2}|j||�dkd
|||�f�q5WdS(Ni����(RttGarbagesMandag 16. September 1996s
01-00-1980s
01-13-1980s
00-01-1980s
32-01-1980s01-01-1980 25:00:00s01-01-1980 00:61:00s01-01-1980 00:00:62s,http2time(%s) is not None
http2time(test) %s(RRt
assertTruetNone(RRttest((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_http2time_garbageSs
(t__name__t
__module__R
RRR (((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyRs			$tHeaderTestscBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsVddlm}ddd
gg}x-d	d
gD]}|j||g�|�q/WdS(Ni����(tparse_ns_headerstfootbartexpiresld9Wtversiont0s)foo=bar; expires=01 Jan 2040 22:23:32 GMTs+foo=bar; expires="01 Jan 2040 22:23:32 GMT"(sfooR&(sexpiresld9W(sversionR)(RR$R(RR$Rthdr((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_parse_ns_headers_expiresjs
cCsSddlm}d	d
gg}x-ddgD]}|j||g�|�q,WdS(Ni����(R$R%R&R(t1sfoo=bar; version="1"sfoo=bar; Version="1"(sfoosbar(sversionR,(RR$R(RR$RR*((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_parse_ns_headers_versionus
cCsBddlm}d}dd	gg}|j||g�|�dS(
Ni����(R$s expires=01 Jan 2040 22:23:32 GMTR's01 Jan 2040 22:23:32 GMTR(R)(sexpiress01 Jan 2040 22:23:32 GMT(sversionR)(RR$R(RR$R*R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt#test_parse_ns_headers_special_names�scCsRddlm}|dd	gg�}|j|d�|j|gg�d�dS(
Ni����(tjoin_header_wordsR%R&tbazsfoo; bar=bazR(sfooN(sbarR0(RR/RR(RR/tjoined((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_join_header_words�sc	Cs�ddlm}ddggfddggfddggfddggfd	dggfd
d ggfdd!d"ggfd
d#d$ggfdd%ggfdd&d'ggfdd(d)d*ggfdd+gd,gd-ggfdd.d/gd0gd1gd2ggfg
}x�|D]�\}}y||g�}WnKddl}ddl}|j�}|jd|�d|j�}nX|j||d|||f�qWdS(3Ni����(tsplit_header_wordsR%sfoo=barR&s	   foo   s
   foo=   Rs   foo=s   foo=   ; s   foo=   ; bar= baz R0sfoo=bar bar=bazsfoo= bar=bazsbar=bazsfoo=bar;bar=bazsfoo bar bazsa, b, ctatbtcs(foo; bar=baz, spam=, foo="\,\;\"", bar= tspams,;"s (error -- traceback follows)

%ss:
When parsing: '%s'
Expected:     '%s'
Got:          '%s'
(sfooN(sfoosbar(sfooN(sfooR(sfooR(sfooR(sfooR(sbarsbaz(sfoosbar(sbarsbaz(sfoosbar=baz(sfoosbar(sbarsbaz(sfooN(sbarN(sbazN(R4N(R5N(R6N(sfooN(sbarsbaz(sspamR(sfoos,;"(sbarR(RR3Rt	tracebacktStringIOt	print_exctgetvalueR(	RR3RtargtexpectRR8R9tf((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_split_header_words�s4	cCs�ddlm}m}ddddddd d!d"d#d$d%d&g
}xR|D]J\}}||g�}||�}|j||d||||f�qJWdS('Ni����(R3R/R%sfoo=bars	   foo   sfoo=sfoo=""sfoo=bar bar=bazsfoo=bar; bar=bazsfoo=bar;bar=bazsfoo bar bazs
foo; bar; bazsfoo="\"" bar="\\"sfoo="\""; bar="\\"s	foo,,,barsfoo, barsfoo=bar,bar=bazsfoo=bar, bar=bazstext/html; charset=iso-8859-1stext/html; charset="iso-8859-1"s)foo="bar"; port="80,81"; discard, bar=bazs'foo=bar; port="80,81"; discard, bar=bazsBasic realm="\"foo\\\\bar\""sBasic; realm="\"foo\\\\bar\""sM
When parsing: '%s'
Expected:     '%s'
Got:          '%s'
Input was:    '%s'
(sfoosfoo(sfoo=barsfoo=bar(s	   foo   sfoo(sfoo=sfoo=""(sfoo=bar bar=bazsfoo=bar; bar=baz(sfoo=bar;bar=bazsfoo=bar; bar=baz(sfoo bar bazs
foo; bar; baz(sfoo="\"" bar="\\"sfoo="\""; bar="\\"(s	foo,,,barsfoo, bar(sfoo=bar,bar=bazsfoo=bar, bar=baz(stext/html; charset=iso-8859-1stext/html; charset="iso-8859-1"(s)foo="bar"; port="80,81"; discard, bar=bazs'foo=bar; port="80,81"; discard, bar=baz(sBasic realm="\"foo\\\\bar\""sBasic; realm="\"foo\\\\bar\""(RR3R/R(RR3R/RR<R=tinputtres((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_roundtrip�s,	(R!R"R+R-R.R2R?RB(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyR#hs			
		$tFakeResponsecBs eZgdd�Zd�ZRS(cCsOddl}ddl}|jdj|��}|j|�|_||_dS(sD
        headers: list of RFC822-style 'Key: value' strings
        i����Ns
(t	mimetoolsR9tjointMessaget_headerst_url(RtheadersturlRDR9R>((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt__init__�scCs|jS(N(RG(R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pytinfo�sN(R!R"RRKRL(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyRC�scGst|||d�S(NsSet-Cookie2(t	_interact(t	cookiejarRJtset_cookie_hdrs((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt
interact_2965�scGst|||d�S(Ns
Set-Cookie(RM(RNRJRO((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pytinteract_netscape�sc
Cs�ddlm}||�}|j|�|jdd�}g}x%|D]}|jd||f�qHWt||�}	|j|	|�|S(sDPerform a single request / response cycle, returning Cookie: header.i����(tRequesttCookieRs%s: %s(turllib2RRtadd_cookie_headert
get_headertappendRCtextract_cookies(
RNRJROthdr_nameRRtreqt
cookie_hdrRIR*RA((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyRM�s

tFileCookieJarTestscBseZd�Zd�ZRS(cCs�ddlm}tj}|�}t|dd�|j|jdddjd�z3|j	|dt
�|�}|j|dt
�Wdytj
|�Wntk
r�nXX|j|jdddjd�dS(Ni����(tLWPCookieJarshttp://www.acme.com/tbooswww.acme.comt/tignore_discard(RR]RtTESTFNRQRt_cookiestvalueRtsavetTruetloadtostunlinktOSError(RR]tfilenameR6((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_lwp_valueless_cookie�s		"	
c	Csddlm}m}m}tj}xg||fD]Y}|�}y|jdd�Wn&tk
r}}|j|j	t�q2X|j
d�q2WzVt|d�}|jd�x3||fD]%}|�}|j
||j|�q�WWdytj|�Wntk
rnXXdS(Ni����(R]tMozillaCookieJart	LoadErrorRjsAfor this test to work, a file with this filename should not exists%expected IOError for invalid filenametwsoops
(RR]RlRmRRaRftIOErrorRt	__class__tfailtopentwritetassertRaisesRgRhRi(	RR]RlRmRjtcookiejar_classR6texcR>((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_bad_magic
s&		
	
(R!R"RkRw(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyR\�s	tCookieTestscBseZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z RS(c	CsFddl}ddl}|j�}xddtfddtfddtfddtfddtfddtfdd	tfd
dtfd
dtfd
d
tfd
d	tfddtfddtfddtfddtfddtfgD]S\}}}|j|�}|j||�}|r1|j|�q�|j|�q�WdS(Ni����shttp://foo.bar.com/sblah.comsrhubarb.blah.comsrhubarb.foo.bar.coms.foo.bar.comsfoo.bar.coms.bar.comtcomshttp://foo.com/srhubarb.foo.coms.foo.comsfoo.comshttp://foo/srhubarb.foos.fooR%s	foo.locals.local(	RRTtDefaultCookiePolicytFalseReRRtdomain_return_okRtassertFalse(	RRRTtpolRJtdomaintoktrequesttr((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_domain_return_okSs0cCswddlm}m}tj}||�}t|dd�t|dd�|jddd}|j|j�|j	|j
d�|jddd	}|j|j�|j	|j
d	�|j	||�d
�t|�}|jdt
dt
�z&||�}|jdt
dt
�Wdtj|j�X|j	t|�tjd
t
d
t|��|j	t|d�d�dS(Ni����(Rltlwp_cookie_strshttp://www.acme.com/teggss"spam"; path=/foo/swww.acme.comR_s/foo/s"spam"sJ"spam"; path="/foo/"; domain="www.acme.com"; path_spec; discard; version=0tignore_expiresR`spath_specified=%sshttp://www.acme.com/foo/s"spam"; eggs(RRlR�RRaRQRbtassertIsNoneRcRtnametreprRdRetrevertRgRhRjtretsubR{(RRlR�RjR6tcookietold_str((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_missing_valuers2		
c
Cs;ddlm}m}xdtdfdtdfttdfttdfttdfttdfgD]�\}}}|d|d|�}||�}t|dd�y|jd	d
d}Wntk
r�|j	|�qeX|j
|j|�t|dd�|re|jd	d
d
}	|j
|	jd�qeqeWdS(Ni����(t	CookieJarRziitrfc2109_as_netscapetrfc2965shttp://www.example.com/sni=ni; Version=1swww.example.comR_tnisfoo=bar; Version=1R%(
RR�RzRR{ReRQRbtKeyErrorR�RR(RP(
RR�RzR�R�R(tpolicyR6R�t
cookie2965((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_rfc2109_handling�s.	
	cCsaddlm}m}|�}t|dd�t|dd�t|dd�t|dd�t|dd	�t|dd
�t|dd�t|dd�|jd
dd}|j|jd
�|j|j�|j|j	|�|j
|j�|j|jd��|j
|jd��|jddd}|j|jd�|j
|j�|j|j	d�|j|j�|jddd}|j
|j	�|j
|j�|jddd}|jddd}|j
|j�|j
|j�|jddd}|j|j�|j|jd�|jddd}|j
|j�dS(Ni����(R�tDEFAULT_HTTP_PORTshttp://www.acme.com/s0spam=eggs; DoMain=.acme.com; port; blArgh="feep"sni=ni; port=80,8080shttp://www.acme.com:80/snini=nisfoo=bar; expires=s-spam=eggs; expires="Foo Bar 25 33:22:11 3022"s	fortytwo=s=unladenswallowtholyhandgrenades	.acme.comR_R7tblArghtblarghswww.acme.comR�s80,8080tniniR%tfortytwoR(RR�R�RQRbRRRtdomain_specifiedtportR}tport_specifiedthas_nonstandard_attrR�R'tassertIsNotNoneRc(RR�R�R6R�R%R7((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_ns_parser�sF		cCstddlm}|�}t|dd�t|dd�|jdd}|jd|k�|jd	|k�dS(
Ni����(R�shttp://www.acme.com/sexpires=eggssversion=eggs; spam=eggsswww.acme.comR_R'R((RR�RQRbR(RR�R6tcookies((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_ns_parser_special_names�s	cCs�ddlm}m}|�}|tj�d�}t|dd|�|jt|�d�|tj�d�}t|dd|�t|d�}|jt|�d�|jd|ko�d	|k�t|dd
|�t|dd|�|jt|�d�t|dd
|�t|dd|�t|d�}|jt|�d�t|dd�|jt|�d�|j�|jt|�d�|j	d|�dS(Ni����(t
time2netscapeR�ishttp://www.acme.com/sspam="bar"; expires=%sisfoo="eggs"; expires=%ss
spam="bar"R%seggs="bar"; expires=%ssbar="bar"; expires=%sis!eggs="bar"; expires=%s; max-age=0s bar="bar"; max-age=0; expires=%sshttp://www.rhubarb.net/swhum="fizz"i(
RR�R�RRQRtlenRtclear_session_cookiestassertIn(RR�R�R6tfuturetnowth((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_expires�s8	
cCs�ddlm}m}|dt�}||�}t|dd�|jd|jd�||�}t|dd	�|jd|jd�||�}t|d
d	�|jd|jd�||�}t|dd	�|jd
|jd�|�}t|dd�|jd|jd�|�}t|dd�|jd|jd�|�}t|d
d�|jd|jd�|�}t|dd�|jd|jd�dS(Ni����(R�RzR�shttp://www.acme.com/sspam="bar"; Version="1"R_swww.acme.comshttp://www.acme.com/blahseggs="bar"; Version="1"s http://www.acme.com/blah/rhubarbs/blah/s!http://www.acme.com/blah/rhubarb/s/blah/rhubarb/s
spam="bar"s
eggs="bar"s/blahs
/blah/rhubarb(RR�RzReRPR�RbRQ(RR�RzR~R6((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_default_paths8						cCs\tj�}d}d}t|||�|jd|jd�|jt||�|�dS(Nshttp://example.com/?spam/eggss
eggs="bar"R_sexample.com(RR�RQR�RbR(RtcjturiRc((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_default_path_with_queryFscCshddlm}dddddddddddg}x*|D]"\}}|j||�|�q>WdS(Ni����(tescape_paths/foo%2f/bars/foo%2F/bars
/foo%%/bars/fo%19o/bars/fo%7do/bars/fo%7Do/bars	/foo/bar&s	/foo//bars	~/foo/bars	/foo/bars/foo%19/bars	/}foo/bars/%7Dfoo/baru/foo/barꯍs/foo/bar%EA%AF%8D(s/foo%2f/bars/foo%2F/bar(s/foo%2F/bars/foo%2F/bar(s
/foo%%/bars
/foo%%/bar(s/fo%19o/bars/fo%19o/bar(s/fo%7do/bars/fo%7Do/bar(s	/foo/bar&s	/foo/bar&(s	/foo//bars	/foo//bar(s	~/foo/bars	~/foo/bar(s	/foo/bars/foo%19/bar(s	/}foo/bars/%7Dfoo/bar(u/foo/barꯍs/foo/bar%EA%AF%8D(RR�R(RR�tcasesR<R((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_escape_pathPs	cCs�ddlm}ddlm}|d�}|j||�d�|d�}|j||�d�|d�}|j||�d	�dS(
Ni����(RR(trequest_pathsThttp://www.example.com/rheum/rhaponticum;foo=bar;sing=song?apples=pears&spam=eggs#nis$/rheum/rhaponticum;foo=bar;sing=songsBhttp://www.example.com/rheum/rhaponticum?apples=pears&spam=eggs#nis/rheum/rhaponticumshttp://www.example.comR_(RTRRRR�R(RRRR�RZ((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_request_pathhscCs�ddlm}ddlm}m}|ddidd6�}|j||�d�|d	didd6�}|j||�|�dS(
Ni����(RR(trequest_portR�shttp://www.acme.com:1234/RIswww.acme.com:4321tHostt1234shttp://www.acme.com/(RTRRRR�R�R(RRRR�R�RZ((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_request_portxs		cCs�ddlm}ddlm}|ddidd6�}|j||�d�|d	did
d6�}|j||�d�|ddidd6�}|j||�d�|d
didd6�}|j||�d�dS(Ni����(RR(trequest_hostshttp://1.1.1.1/RIswww.acme.com:80R�s1.1.1.1shttp://www.acme.com/sirrelevant.comswww.acme.coms/resource.htmls&http://www.acme.com:2345/resource.htmlswww.acme.com:5432(RTRRRR�R(RRRR�RZ((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_request_host�s				cCs�ddlm}|j|d��|j|d��|j|d��|j|d��|j|d��|j|d��|j|d	��|j|d
��dS(Ni����(tis_HDNsfoo.bar.coms1foo2.3bar4.5coms192.168.1.1Rt.s.foo.bar.coms..foosfoo.(RR�RR}(RR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_is_HDN�scCs�ddlm}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d	�|j|d
�d
�|j|d�d�dS(Ni����(treachswww.acme.coms	.acme.comsacme.coms
acme.locals.locals.comR�Rs192.168.0.1(RR�R(RR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt
test_reach�scCs�ddlm}m}|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|d	d
��|j|d
d	��|j|dd��|j|d
d��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��|j|dd��dS(Ni����(tdomain_matchtuser_domain_matchs192.168.1.1s.168.1.1sx.y.comsx.Y.coms.Y.comsY.coms	a.b.c.coms.c.coms
example.locals.locals	blah.blahRs.rhubarb.rhubarbsacme.coms	.acme.comsrhubarb.acme.comswww.rhubarb.acme.comsy.coms.y.coms.comRytms.mR�(RR�R�RR}(RR�R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_domain_match�s@cCsCddlm}|�}t|dd�|jt|�d�dS(Ni����(R�shttp://www.nasty.com/s)foo=bar; domain=friendly.org; Version="1"i(RR�RPRR�(RR�R6((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_wrong_domain�s
		cCs�ddlm}m}|dt�}|d|�}t|dd�t|dd�|jt|�d�xDd	d
ddgD]0}t|d
|d�|jt|�d�q}WdS(Ni����(R�Rzt
strict_domainR�shttp://example.co.uk/sno=problemos!okey=dokey; Domain=.example.co.ukis.co.uks.org.zas.tx.uss.name.usshttp://example.%s/sspam=eggs; Domain=.co.uk(RR�RzReRQRR�(RR�RztcpR�t
pseudo_tld((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_strict_domain�s	
cCs�ddlm}m}|�}t|dd�|jt|�d�|j|jdddjd	�|jt|d�d�|jt|d
�d�|d|j�}|j	|�|jt|d
�d�t|d
d�t|dd�|jt|�d�|j|jdddjd�|j|jdddjd�|jt|d�d�t|dd�|jt|�d�t|dd�|jt|�d�dS(Ni����(R�Rzshttp://foo.net/sns=barisfoo.netR_tnsR&shttp://www.foo.net/tstrict_ns_domainRshttp://foo.net/foo/sspam1=eggs; domain=foo.netshttp://foo.net/foo/bar/sspam2=eggs; domain=.foo.netis.foo.nets/footspam1R�s/foo/bartspam2sspam2=eggs; spam1=eggs; ns=barsnini="ni"; domain=.netshttp://foo.co.uksnasty=trick; domain=.co.uki(
RR�RzRQRR�RbRctDomainStrictNonDomaint
set_policy(RR�RzR6R~((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_two_component_domain_ns�s6	"
		cCs�ddlm}m}|dt�}||�}t|dd�|jt|�d�|j|jddd	jd
�|jt|d�d�|jt|d�d
�t|dd�|jt|�d�|jt|d�d�t|dd�|j|jdddjd�|jt|�d�|jt|d�d�|jt|d�d�t|dd�|jt|�d�t|dd�|jt|�d�dS(Ni����(R�RzR�shttp://foo.net/sfoo=bar; Version="1"isfoo.netR_R%R&s$Version=1; foo=barshttp://www.foo.net/Rshttp://foo.net/foos1spam=eggs; domain=foo.net; path=/foo; Version="1"shttp://www.foo.net/foo/s&spam=eggs; domain=foo.net; Version="1"s.foo.nets/foo/R7R�ishttp://foo.net/foo/s($Version=1; spam=eggs; $Domain="foo.net"s#ni="ni"; domain=".net"; Version="1"shttp://foo.co.uk/s'nasty=trick; domain=.co.uk; Version="1"i(	RR�RzReRPRR�RbRc(RR�RzR~R6((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt!test_two_component_domain_rfc2965!s:"				c	Cs�ddlm}m}ddlm}|d|ddgddg��}|d	�}d
g}t|d	�}|j||�|jt|�d�|d�}t|d�}|j||�|jt|�d
�|d�}t|d�}|j||�|jt|�d
�|d�}t|d�}|j	||�}|j
|d�|jt|�d�|j|�|j|j
d��dS(Ni����(R�Rz(RRR�tblocked_domainssacme.comtallowed_domainsswww.acme.comshttp://acme.com/s*Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/ishttp://www.acme.com/ishttp://www.coyote.com/iRS(RR�RzRTRRRCRXRR�tmake_cookiest
set_cookieRUR}t
has_header(	RR�RzRRR6RZRIRAR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_domain_allowOs2		
cCsddlm}m}ddlm}|dtddg�}|d|�}dg}|d	�}t|d	�}|j||�|jt	|�d
�|j
dg�}	|j||�|jt	|�d�|j�|d
�}t|d
�}|j||�|jt	|�d�|d
�}|j|�|j
|jd��|j
|jd��|j�|j
dg�|j||�|jt	|�d�|d	�}t|d	�}|j||�}
|j|
d
�|jt	|�d�|j|�|j|jd��dS(Ni����(R�Rz(RRR�R�s	.acme.comR�s*Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/shttp://www.acme.com/isacme.comishttp://www.roadrunner.net/RStCookie2i(RR�RzRTRRReRCRXRR�tset_blocked_domainstclearRURR�R�R�R}(RR�RzRRR~R6RIRZRAtpR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_domain_blockqsB	



c
Csddlm}m}x�ttfD]�}x�dD]�}|�}|rc|dt�}t}d}n|dt�}t}d}|j|�d}	|||	d||f�|||	d	||f�|j|j	d
ddj
d
�|j|j	d
ddj
d�q0Wq#WdS(Ni����(R�Rzt RR�s; Version=1shttp://www.acme.com/sfoo1=bar%s%ssfoo2=bar%s; secure%sswww.acme.comR_tfoo1s#non-secure cookie registered securetfoo2s#secure cookie registered non-secure(R�R(RR�RzReR{RQRPR�R}RbtsecureR(
RR�RzR�t
whitespaceR6R~tinttvsRJ((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_secure�s*
		
cCsaddlm}m}|d|dt��}t|dd�t|d�}|j|d�dS(Ni����(R�RzR�R�shttp://www.acme.com/sfoo=\b"a"r; Version=1s$Version=1; foo=\\b\"a\"r(RR�RzReRPR(RR�RzR6R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_quote_cookie_value�s
cCs�ddlm}m}ddlm}d}||dt��}t||d�||�}|jt|�d�|j	|�|j
|jd��dS(	Ni����(R�Rz(RRshttp://www.acme.comR�sfoo=bar; Version=1iRS(RR�RzRTRRReRPRR�RURR�(RR�RzRRRJR6RZ((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_missing_final_slash�s
cCs�ddlm}m}|dt�}||�}d}t||d�t||�}|jd|d�||�}d}t||d�t||�}|jd	|d
�||�}d}t||d�t||�}|jd|d
�dS(
Ni����(R�RzR�shttp://foo.bar.com/sspam=eggs; Version=1tDomains*absent domain returned with domain presents%spam=eggs; Version=1; Domain=.bar.coms$Domain=".bar.com"sdomain not returneds$spam=eggs; Version=1; Domain=bar.coms$Domain="bar.com"(RR�RzReRPtassertNotInR�(RR�RzR~R6RJR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_domain_mirror�s$cCs�ddlm}m}|dt�}||�}d}t||d�t||�}|jd|d�||�}d}t||d�t||�}|jd	|d
�dS(Ni����(R�RzR�shttp://foo.bar.com/sspam=eggs; Version=1tPaths&absent path returned with path presentsspam=eggs; Version=1; Path=/s	$Path="/"spath not returned(RR�RzReRPR�R�(RR�RzR~R6RJR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_path_mirror�scCs9ddlm}m}|dt�}||�}d}t||d�t||�}|jd|d�||�}d}t||d�t||�}|j|d	d
�||�}d}t||d�t||�}|jd|d
�||�}d}t||d�t||�}|jd|d�dS(Ni����(R�RzR�shttp://foo.bar.com/sspam=eggs; Version=1tPorts&absent port returned with port presentsspam=eggs; Version=1; Ports\$Port([^=]|$)s-port with no value not returned with no valuesspam=eggs; Version=1; Port="80"s
$Port="80"s5port with single value not returned with single values$spam=eggs; Version=1; Port="80,8080"s$Port="80,8080"s;port with multiple values not returned with multiple values(RR�RzReRPR�RR�(RR�RzR~R6RJR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_port_mirror�s2cCsgddlm}m}||dt��}d}t||d�t||�}|jd|d�dS(Ni����(R�RzR�shttp://foo.bar.com/sfspam=eggs; Version=1; Comment="does anybody read these?"; CommentURL="http://foo.bar.net/comment.html"tComments:Comment or CommentURL cookie-attributes returned to server(RR�RzReRPR�(RR�RzR6RJR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_no_return_commentscCs}ddlm}m}m}||dt��}t|dd�t|dd�t|dd�t|dd	�t|d
d�dddd
dg}dddddg}dddddg}dddddg}x�td�D]�}	d
}	x�|D]|}
|j|
|�|j	|
j
||	�|j	|
j||	�|j	|
j||	�|j	|
j
||	�|	d}	q�Wq�WdS(Ni����(R�RSRzR�shttp://blah.spam.org/sefoo=eggs; Version=1; Comment="does anybody read these?"; CommentURL="http://foo.bar.net/comment.html"shttp://www.acme.com/blah/sspam=bar; securesfoo=bar; secure; Version=1sfoo=bar; path=/; Version=1shttp://www.sol.nossbang=wallop; version=1; domain=".sol.no"; port="90,100, 80,8080"; max-age=100; Comment = "Just kidding! (\"|\\\\) "iitbangR%R7s.sol.nos
blah.spam.orgswww.acme.comR_s/blahs/blah/i(RR�RSRzReRPRQtrangetassertIsInstanceRR(R�Rtpath(RR�RSRztcstversionstnamestdomainstpathstiR6((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_Cookie_iterators0				
cCs�ddlm}|j|dg�ddddgg�|j|dg�dddgg�|j|dg�ddgg�|j|d
g�dddgg�|j|dg�ddgg�|j|dg�g�dS(Ni����(R$sfoo=bar; path=/; domainR%R&R�R_RR(R)s)foo=bar; expires=Foo Bar 12 33:22:11 2000R'sfoo=bar; expiressfoo=bar; versionR(sfoosbar(spathR_(sdomainN(sversionR)(sfoosbar(sexpiresN(sversionR)(sfooN(sversionR)(sfoosbar(sexpiresN(sversionR)(sfoosbar(sversionN(RR$RR(RR$((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_parse_ns_headersAs$cCs�d�}tjtj�d�}xXdgdgdgdgdgd|ggD](}||�}|jt|�d	�qQWd
g}||�}|jddd
}|j|j�dS(NcSsXddlm}ddlm}|�}|d�}t|d�}|j||�|S(Ni����(R�(RRshttp://www.example.com/(RR�RTRRRCRX(RIR�RRR6RZR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pytcookiejar_from_cookie_headers`s	isSet-Cookie: s
Set-Cookie2: s-Set-Cookie2: a=foo; path=/; Version=1; domainsSet-Cookie: b=foo; max-age=oopssSet-Cookie: b=foo; version=spamsSet-Cookie:; Expires=%sis3Set-Cookie: c=foo; expires=Foo Bar 12 33:22:11 2000swww.example.comR_R6(RR�RRR�RbR�R'(RR�R�RIR6R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_bad_cookie_header^s			(!R!R"R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyRx$s>/		"	!	2	
	(	*	
			
				%			2	.	"	+						!		"	tLWPCookieTestscBsteZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(c
CsCddlm}m}ddlm}tj�dd}g}||dt��}|ddid	d
6�}|jd|�t	|d�}|j
||�|d�}|j|�|j|j
d
�d�|j|j
d�d�|jd�t	|d�}|j
||�|d�}|j|�|j
d
�}	|jd|	�|jd|	�|jd�t	|d�}|j
||�|d�}|j|�|j
d
�}	|jd|	�|jd|	�|jd|	�|d�}|j|�|j
d
�}	|jd|	�|jd|	�|j|	jd��dS(Ni����(R�Rz(RRiiR�shttp://www.acme.com:80/RIswww.acme.com:80R�sVSet-Cookie: CUSTOMER=WILE_E_COYOTE; path=/ ; expires=Wednesday, 09-Nov-%d 23:12:40 GMTshttp://www.acme.com/RSsCUSTOMER=WILE_E_COYOTER�s$Version="1"s4Set-Cookie: PART_NUMBER=ROCKET_LAUNCHER_0001; path=/shttp://www.acme.com/foo/bars PART_NUMBER=ROCKET_LAUNCHER_0001s%Set-Cookie: SHIPPING=FEDEX; path=/fooshttp://www.acme.comsSHIPPING=FEDEXshttp://www.acme.com/foo/sSHIPPING=FEDEX;(RR�RzRTRRRt	localtimeReRWRCRXRURRVR�R�Rt
startswith(
RR�RzRRt
year_plus_oneRIR6RZRAR�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_netscape_example_1�sN&	





cCs�ddlm}ddlm}|�}g}|d�}|jd�t|d�}|j||�|d�}|j|�|j|j	d�d�|jd�t|d�}|j||�|d	�}|j|�|j
|j	d�d
�dS(Ni����(R�(RRshttp://www.acme.com/s4Set-Cookie: PART_NUMBER=ROCKET_LAUNCHER_0001; path=/RSs PART_NUMBER=ROCKET_LAUNCHER_0001s6Set-Cookie: PART_NUMBER=RIDING_ROCKET_0023; path=/ammoshttp://www.acme.com/ammosBPART_NUMBER=RIDING_ROCKET_0023;\s*PART_NUMBER=ROCKET_LAUNCHER_0001(RR�RTRRRWRCRXRURRVR(RR�RRR6RIRZRA((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_netscape_example_2�s(	


cCs�ddlm}m}||dt��}t|dd�}|j|�t|dd�}|j|d�t|d	d
�}|j|d�|j|d�|j|d
�t|d�}|j|d�|jd|�dS(Ni����(R�RzR�shttp://www.acme.com/acme/logins3Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"s!http://www.acme.com/acme/pickitems=Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"s=^\$Version="?1"?; Customer="?WILE_E_COYOTE"?; \$Path="/acme"$s!http://www.acme.com/acme/shippings+Shipping="FedEx"; Version="1"; Path="/acme"s^\$Version="?1"?;s7Part_Number="?Rocket_Launcher_0001"?;\s*\$Path="\/acme"s-Customer="?WILE_E_COYOTE"?;\s*\$Path="\/acme"s http://www.acme.com/acme/processs%Shipping="?FedEx"?;\s*\$Path="\/acme"t
WILE_E_COYOTE(RR�RzReRPR}RR�(RR�RzR6R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_ietf_example_1s*	
								cCs�ddlm}m}||dt��}t|ddd�t|d�}|j|d�t|d	�}|jd
|�|jd|�dS(Ni����(R�RzR�s&http://www.acme.com/acme/ammo/specifics=Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"s@Part_Number="Riding_Rocket_0023"; Version="1"; Path="/acme/ammo"s!http://www.acme.com/acme/ammo/...s(Riding_Rocket_0023.*Rocket_Launcher_0001shttp://www.acme.com/acme/parts/tRocket_Launcher_0001tRiding_Rocket_0023(RR�RzReRPRR�R�(RR�RzR6R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_ietf_example_2�s
	c	Cszddlm}m}|dt�}|d|�}d}t|dd�}|j|�t|dd�}|jt|�d	�t|d
d�}|jt|�d	�t|d
d�}|jt|�d
�t|dd�}|jt|�d
�t|dd�}|jt|�d
�t|dd�}|jt|�d�t|dd�}|jt|�d�t|dd�}|jt|�d�t|dd�}|jt|�d�t|dd�}|jt|�d�tj	}zE|j
|dt�t|�}|d|�}|j|dt�Wdyt
j|�Wntk
r^nXX|j|t|��dS(Ni����(RzR]R�R�smax-age=3600shttp://www.acme.coms!foo=bar; domain=".com"; version=1s'ping=pong; domain="acme.com"; version=1ishttp://www.a.acme.coms'whiz=bang; domain="acme.com"; version=1s,wow=flutter; domain=".a.acme.com"; version=1ishttp://125.125.125.125s*zzzz=ping; domain="125.125.125"; version=1shttp://www.sol.nos6blah=rhubarb; domain=".sol.no"; path="/foo"; version=1shttp://www.sol.no/foo/bars3bing=bong; domain=".sol.no"; path="/foo"; version=1is5whiz=ffft; domain=".sol.no"; port="90,100"; version=1ssbang=wallop; version=1; domain=".sol.no"; port="90,100, 80,8080"; max-age=100; Comment = "Just kidding! (\"|\\\\) "is9foo9=bar; version=1; domain=".sol.no"; port; max-age=100;ishttp://www.sol.no/<oo/s"foo8=bar; version=1; path="/%3coo"iR`(RRzR]ReRPR}RR�RRaRdR�RfRgRhRi(	RRzR]R~R6tmax_ageR�Rjtold((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_rejection�sb		
																					
cCs�ddlm}m}||dt��}t|dd�t|dd�}tjdtj�}|jd	|�|j	||�t|d
�}|j
|�t|d�}dS(Ni����(R�RzR�s1http://www.acme.com/foo%2f%25/%3c%3c%0Anew%E5/%E5sfoo  =   bar; version    =   1s+http://www.acme.com/foo%2f%25/<<%0anew�/��s bar=baz; path="/foo/"; version=1s^\$version=\"?1\"?sfoo=bars)http://www.acme.com/foo/%25/<<%0anew�/��uhttp://www.acme.com/ü(RR�RzReRPR�tcompiletIR�RR}(RR�RzR6R�t
version_re((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_url_encoding s		
csVddlm�m�tj�dd}tj���d�dt��}t|dd�t|dd	�t|dd
�d|f}t	|dd
|�t	|dd|�t	|dd|����fd�}||t�}|j
t|�d�|jdt
|��||t�}|j
t|�d�|jdt
|��dS(Ni����(RlRziiR�R�shttp://www.acme.com/s foo1=bar; max-age=100; Version=1s4foo2=bar; port="80"; max-age=100; Discard; Version=1sfoo3=bar; secure; Version=1sexpires=09-Nov-%d 23:12:40 GMTshttp://www.foo.com/sfooa=bar; %ssfoob=bar; Domain=.foo.com; %ss fooc=bar; Domain=www.foo.com; %scsiz<|jd|����dt��}|jd|�Wdytj��Wntk
rcnXX|S(NR`R�(RdReRfRgRhRi(R�R`tnew_c(RzRlRj(sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pytsave_and_restoreOs
isname='foo1', value='bar'i(RRlRzRRRRaReRPRQRR�R�R�R{(RRR6R'RR((RzRlRjsl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_mozilla7s0				
			cCs�ddlm}ddlm}|�}g}|d�}|jd�t|d�}|j||�|jd�t|d�}|j||�|d�}|j|�|jd|j	d	�ko�d
|j	d	�k�dS(Ni����(R�(RRshttp://foo.bar.acme.com/foos4Set-Cookie: Customer=WILE_E_COYOTE; domain=.acme.comshttp://www.acme.com/foos4Set-Cookie: PART_NUMBER=3,4; domain=foo.bar.acme.comsPART_NUMBER=3,4RSsCustomer=WILE_E_COYOTE(
RR�RTRRRWRCRXRURRV(RR�RRR6RIRZRA((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_netscape_miscbs 	


cCs�ddlm}m}||dt��}t|dd�t|dd�}|jd|�t|dd�t|d�}|jd	|�|jt|�d
�dS(Ni����(R�RzR�shttp://example/s#foo1=bar; PORT; Discard; Version=1;s$foo2=bar; domain=".local"; Version=1sfoo1=barsfoo3=bar; Version=1sfoo2=bari(RR�RzReRPR�RR�(RR�RzR6R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_intranet_domains_2965}s			cCs�ddlm}m}||dt��}t|dd�t|dd�}|jt|�d�|jd|�t|d�}|jd|�|jt|�d�dS(	Ni����(R�RzR�shttp://example/sfoo1=barsfoo2=bar; domain=.localisfoo2=bar(RR�RzR{RQRR�R�(RR�RzR6R�((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_intranet_domains_ns�s		cCsddlm}m}ddlm}||dt��}g}|d�}|jd�t|d�}|j||�|d�}|j	|�|j
|jd�d�|j
|jd	�d
�|d�}|j	|�|j
|jd�d�|j
|jd	�d
�dS(Ni����(R�Rz(RRR�shttp://www.ants.com/s,Set-Cookie: JSESSIONID=ABCDERANDOM123; Path=RSsJSESSIONID=ABCDERANDOM123R�s$Version="1"shttp://www.ants.com:8080(RR�RzRTRRReRWRCRXRURRV(RR�RzRRR6RIRZRA((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_empty_path�s$	


cCs�ddlm}ddlm}tj�dd}|d�}g}|jd�|jd|�|jd	|�|jd
�|jd�t|d�}|�}|j||�idd6dd
6dd6dd6}x-|D]%}	d|	j	}
||
d||
<q�W|j
�x-|D]%}	d|	j	}
||
d||
<qW|j|d
|d�|j|dd�|j|dd�dS(Ni����(R�(RRiis"http://www.perlmeister.com/scriptss$Set-Cookie: s1=session;Path=/scriptssWSet-Cookie: p1=perm; Domain=.perlmeister.com;Path=/;expires=Fri, 02-Feb-%d 23:24:20 GMTs>Set-Cookie: p2=perm;Path=/;expires=Fri, 02-Feb-%d 23:24:20 GMTs<Set-Cookie: s2=session;Path=/scripts;Domain=.perlmeister.coms2Set-Cookie2: s3=session;Version=1;Discard;Path="/"t
session_aftert
perm_aftertsession_beforetperm_befores	%s_befores%s_after(
RR�RTRRRRRWRCRXRcR�RtassertNotEqual(RR�RRRRZRIRAR6tcounterR�tkey((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyttest_session_cookies�s:
		

	






(R!R"RRRR	RRRRRRRR(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyR��s	^	6	r	8	]		+				"cCstjttttt�dS(N(Rtrun_unittestRR#RxR\R�(tverbose((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt	test_main�st__main__R!(t__doc__RRgR�RtunittestRRRRR#RCRPRQRMR\RxR�RR"R!Re(((sl/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_cookielib.pyt<module>s.Zr			+���a��k