~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-22 10:35:56 UTC
  • mto: (3928.1.1 bzr.integration)
  • mto: This revision was merged to the branch mainline in revision 3929.
  • Revision ID: v.ladeuil+lp@free.fr-20071122103556-djp1gm22n2npztk0
Add a fake https server and test facilities.

* bzrlib/transport/http/_urllib2_wrappers.py:
(HTTPSConnection.connect_to_origin): Disable ssl wrapping temporarily.

* bzrlib/transport/http/_urllib.py:
(get_test_permutations): Add https tests if a server is available.

* bzrlib/tests/http_server.py:
(TestingHTTPServer): Fix typo.
(HttpServer.get_bogus_url): Use _url_protocol.

* bzrlib/tests/__init__.py:
(_HTTPSServerFeature): Define a feature since an https test server
will have dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2754
2754
    def feature_name(self):
2755
2755
        return 'FTPServer'
2756
2756
 
 
2757
 
2757
2758
FTPServerFeature = _FTPServerFeature()
 
2759
 
 
2760
 
 
2761
class _HTTPSServerFeature(Feature):
 
2762
    """Some tests want an https Server, check if one is available.
 
2763
 
 
2764
    Placeholder. We only implement an http server for now.
 
2765
    """
 
2766
 
 
2767
    def _probe(self):
 
2768
        return True
 
2769
 
 
2770
    def feature_name(self):
 
2771
        return 'HTTPSServer'
 
2772
 
 
2773
 
 
2774
HTTPSServerFeature = _HTTPSServerFeature()