/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_https_urllib.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-05 07:32:38 UTC
  • mto: (7290.1.21 work)
  • mto: This revision was merged to the branch mainline in revision 7311.
  • Revision ID: jelmer@jelmer.uk-20190305073238-zlqn981opwnqsmzi
Add appveyor configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    trace,
27
27
)
28
28
from .. import tests
29
 
from ..transport.http import ssl, opt_ssl_ca_certs
 
29
from ..transport.http import _urllib2_wrappers
 
30
from ..transport.http._urllib2_wrappers import ssl
30
31
 
31
32
 
32
33
class CaCertsConfigTests(tests.TestCaseInTempDir):
48
49
    def test_specified_doesnt_exist(self):
49
50
        stack = self.get_stack('')
50
51
        # Disable the default value mechanism to force the behavior we want
51
 
        self.overrideAttr(opt_ssl_ca_certs, 'default',
 
52
        self.overrideAttr(_urllib2_wrappers.opt_ssl_ca_certs, 'default',
52
53
                          os.path.join(self.test_dir, u"nonexisting.pem"))
53
54
        self.warnings = []
54
55
 
79
80
 
80
81
class MatchHostnameTests(tests.TestCase):
81
82
 
 
83
    def setUp(self):
 
84
        super(MatchHostnameTests, self).setUp()
 
85
        if sys.version_info < (2, 7, 9):
 
86
            raise tests.TestSkipped(
 
87
                'python version too old to provide proper'
 
88
                ' https hostname verification')
 
89
 
82
90
    def test_no_certificate(self):
83
91
        self.assertRaises(ValueError,
84
92
                          ssl.match_hostname, {}, "example.com")