Spade

Mini Shell

Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/ndg/httpsclient/test/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyo

�
�:Oc@s�dZdZdZdZdZdZdZddlmZdd	l	Z	dd
l
mZddlm
Z
ddlmZd
e	jfd��YZedkr�e	j�nd	S(s�unit
tests module for ndg.httpsclient.urllib2_build_opener module

PyOpenSSL utility to make a httplib-like interface suitable for use with 
urllib2
sP J Kershaw (STFC)s06/01/12s2(C) 2012 Science and Technology Facilities
Councils-BSD - see LICENSE file in top-level
directorysPhilip.Kershaw@stfc.ac.uks$Id$i����(tURLErrorN(tSSL(t	Constants(tbuild_openertUrllib2TestCasecBs2eZdZd�Zd�Zd�Zd�ZRS(s$Unit
tests for urllib2
functionalitycCst�}|j|�dS(N(Rtassert_(tselftopener((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyttest01_urllib2_build_openers	cCs;t�}|jtj�}|j|�d|j�GHdS(Nsres
=
%s(RtopenRtTEST_URIRtread(RRtres((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyttest02_opens	
cCs&t�}|jt|jtj�dS(N(RtfailUnlessRaisesRR	Rt	TEST_URI2(RR((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyttest03_open_fails_unknown_loc!s	cCsmtjtj�}d�}|jtj|�|jdd�td|�}|jtj	|j
tj�dS(NcSs|S(N((tconntx509terrnumterrdepthtpreverify_ok((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyt<lambda>(ss./tssl_context(
RtContexttSSLv3_METHODt
set_verifytVERIFY_PEERtload_verify_locationstNoneRRtErrorR	RR
(Rtctxtverify_callbackR((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyt(test04_open_peer_cert_verification_fails%s	(t__name__t
__module__t__doc__RR
RR!(((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyRs
			t__main__(R$t
__author__t__date__t
__copyright__t__license__t__contact__t__revision__turllib2RtunittesttOpenSSLRtndg.httpsclient.testRt$ndg.httpsclient.urllib2_build_openerRtTestCaseRR"tmain(((sE/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_urllib2.pyt<module>s