~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-01-08 17:37:09 UTC
  • mfrom: (3928.1.1 bzr.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090108173709-wgrkm02ayt1gf1n1
(vila) Add native ssl support for python-2.6,
        starting with an https test server

Show diffs side-by-side

added added

removed removed

Lines of Context:
3292
3292
    def feature_name(self):
3293
3293
        return 'FTPServer'
3294
3294
 
 
3295
 
3295
3296
FTPServerFeature = _FTPServerFeature()
3296
3297
 
3297
3298
 
 
3299
class _HTTPSServerFeature(Feature):
 
3300
    """Some tests want an https Server, check if one is available.
 
3301
 
 
3302
    Right now, the only way this is available is under python2.6 which provides
 
3303
    an ssl module.
 
3304
    """
 
3305
 
 
3306
    def _probe(self):
 
3307
        try:
 
3308
            import ssl
 
3309
            return True
 
3310
        except ImportError:
 
3311
            return False
 
3312
 
 
3313
    def feature_name(self):
 
3314
        return 'HTTPSServer'
 
3315
 
 
3316
 
 
3317
HTTPSServerFeature = _HTTPSServerFeature()
 
3318
 
 
3319
 
3298
3320
class _UnicodeFilename(Feature):
3299
3321
    """Does the filesystem support Unicode filenames?"""
3300
3322