~ubuntu-branches/ubuntu/vivid/python-urllib3/vivid

« back to all changes in this revision

Viewing changes to test/contrib/test_pyopenssl.py

  • Committer: Package Import Robot
  • Author(s): Daniele Tricoli
  • Date: 2014-10-21 02:59:57 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20141021025957-7ez2qjmzxhnm33g3
Tags: 1.9.1-2
* debian/control
  - Bump python{,3}-nose to >=1.3.3 to build urllib3 on Wheezy. Thanks to
    Nick Phillips for the report. (Closes: #765035)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from nose.plugins.skip import SkipTest
 
2
import six
 
3
 
 
4
if six.PY3:
 
5
    raise SkipTest('Testing of PyOpenSSL disabled on PY3')
 
6
 
 
7
try:
 
8
    from urllib3.contrib.pyopenssl import (inject_into_urllib3,
 
9
                                           extract_from_urllib3)
 
10
except ImportError as e:
 
11
    raise SkipTest('Could not import PyOpenSSL: %r' % e)
 
12
 
 
13
 
 
14
from ..with_dummyserver.test_https import TestHTTPS, TestHTTPS_TLSv1
 
15
from ..with_dummyserver.test_socketlevel import TestSNI, TestSocketClosing
 
16
 
 
17
 
 
18
def setup_module():
 
19
    inject_into_urllib3()
 
20
 
 
21
 
 
22
def teardown_module():
 
23
    extract_from_urllib3()