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_utils.pyc

�
�4Pc@s�dZdZdZdZdZdZdZddlZddlZdd	l	m
Z
dd
lmZddl
mZmZmZmZdejfd
��YZedkr�ej�ndS(s�unit
tests module for ndg.httpsclient.utils 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����N(tSSL(t	Constants(t
Configurationtfetch_from_urltopen_urlt_should_use_proxytTestUtilsModulecBs2eZdZd�Zd�Zd�Zd�ZRS(s!Test
ndg.httpsclient.utils
modulecCsBttjtj�t�}|j|j�|j|jt�dS(N(	RRtContexttSSLv3_METHODtTruetassert_tssl_contexttassertEqualstdebug(tselftconfig((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest01_configurationscCs>ttjtj�t�}ttj|�}|j|�dS(N(	RRRRR	RRtTEST_URIR
(RRtres((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest02_fetch_from_urlscCsOttjtj�t�}ttj|�}|j|dddtj�dS(Nii�sopen_url
for %r
failed(	RRRRR	RRRtassertEqual(RRR((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest03_open_url#scCs�dtjkr)tjd}tjd=nd}|jttj�d�dtjd<|jttj�d�|dk	r�|tjd<n
tjd=dS(Ntno_proxysExpecting use proxy =
Trueslocalhost,localhost.localdomainsExpecting use proxy =
False(tostenvirontNonet
assertTrueRRRtassertFalse(RR((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest04__should_use_proxy)s


(t__name__t
__module__t__doc__RRRR(((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyRs
			t__main__(Rt
__author__t__date__t
__copyright__t__license__t__contact__t__revision__tunittestRtOpenSSLRtndg.httpsclient.testRtndg.httpsclient.utilsRRRRtTestCaseRRtmain(((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyt<module>s"&