• File: test_utils.pyo
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyo
  • Date Modified: 10/31/2014 10:04 AM
  • File size: 2.81 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

4Pc@sdZdZdZdZdZdZdZddlZddlZdd	l	m
Z
dd
lmZddl
mZmZmZmZdejfd
YZedkrejndS(sunit 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$iN(tSSL(t	Constants(t
Configurationtfetch_from_urltopen_urlt_should_use_proxytTestUtilsModulecBs2eZdZdZdZdZdZRS(s!Test ndg.httpsclient.utils modulecCsBttjtjt}|j|j|j|jtdS(N(	RRtContexttSSLv3_METHODtTruetassert_tssl_contexttassertEqualstdebug(tselftconfig((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest01_configurationscCs>ttjtjt}ttj|}|j|dS(N(	RRRRR	RRtTEST_URIR
(RRtres((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest02_fetch_from_urlscCsOttjtjt}ttj|}|j|dddtjdS(Niisopen_url for %r failed(	RRRRR	RRRtassertEqual(RRR((sC/usr/lib/python2.7/site-packages/ndg/httpsclient/test/test_utils.pyttest03_open_url#scCsdtjkr)tjd}tjd=nd}|jttjddtjd<|jttjd|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"&