/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_http.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
transport implementation, http protocol versions and authentication schemes.
21
21
"""
22
22
 
23
 
# TODO: Should be renamed to bzrlib.transport.http.tests?
24
 
# TODO: What about renaming to bzrlib.tests.transport.http ?
 
23
# TODO: Should be renamed to breezy.transport.http.tests?
 
24
# TODO: What about renaming to breezy.tests.transport.http ?
25
25
 
26
26
import httplib
27
27
import SimpleHTTPServer
29
29
import sys
30
30
import threading
31
31
 
32
 
import bzrlib
33
 
from bzrlib import (
 
32
import breezy
 
33
from breezy import (
34
34
    config,
35
35
    controldir,
36
36
    debug,
42
42
    transport,
43
43
    ui,
44
44
    )
45
 
from bzrlib.tests import (
 
45
from breezy.tests import (
46
46
    features,
47
47
    http_server,
48
48
    http_utils,
49
49
    test_server,
50
50
    )
51
 
from bzrlib.tests.scenarios import (
 
51
from breezy.tests.scenarios import (
52
52
    load_tests_apply_scenarios,
53
53
    multiply_scenarios,
54
54
    )
55
 
from bzrlib.transport import (
 
55
from breezy.transport import (
56
56
    http,
57
57
    remote,
58
58
    )
59
 
from bzrlib.transport.http import (
 
59
from breezy.transport.http import (
60
60
    _urllib,
61
61
    _urllib2_wrappers,
62
62
    )
63
63
 
64
64
 
65
65
if features.pycurl.available():
66
 
    from bzrlib.transport.http._pycurl import PyCurlTransport
 
66
    from breezy.transport.http._pycurl import PyCurlTransport
67
67
 
68
68
 
69
69
load_tests = load_tests_apply_scenarios
136
136
        # (like allowing them in a test specific authentication.conf for
137
137
        # example), we need some specialized pycurl/urllib transport for tests.
138
138
        # -- vila 2012-01-20
139
 
        from bzrlib.tests import (
 
139
        from breezy.tests import (
140
140
            ssl_certs,
141
141
            )
142
142
        class HTTPS_urllib_transport(_urllib.HttpTransport_urllib):
508
508
        self.assertEqual(len(server.logs), 1)
509
509
        self.assertTrue(server.logs[0].find(
510
510
            '"GET /foo/bar HTTP/1.1" 200 - "-" "bzr/%s'
511
 
            % bzrlib.__version__) > -1)
 
511
            % breezy.__version__) > -1)
512
512
 
513
513
    def test_has_on_bogus_host(self):
514
514
        # Get a free address and don't 'accept' on it, so that we
1913
1913
    def setUp(self):
1914
1914
        super(SmartHTTPTunnellingTest, self).setUp()
1915
1915
        # We use the VFS layer as part of HTTP tunnelling tests.
1916
 
        self.overrideEnv('BZR_NO_SMART_VFS', None)
 
1916
        self.overrideEnv('BRZ_NO_SMART_VFS', None)
1917
1917
        self.transport_readonly_server = http_utils.HTTPServerWithSmarts
1918
1918
        self.http_server = self.get_readonly_server()
1919
1919
 
2122
2122
 
2123
2123
 
2124
2124
if features.HTTPSServerFeature.available():
2125
 
    from bzrlib.tests import https_server
 
2125
    from breezy.tests import https_server
2126
2126
    class ActivityHTTPSServer(ActivityServerMixin, https_server.HTTPSServer):
2127
2127
        pass
2128
2128