143
143
auth_scheme_scenarios)
144
144
tests.multiply_tests(tpa_tests, tpa_scenarios, result)
146
# activity: activity on all http versions on all implementations
146
# activity: on all http[s] versions on all implementations
147
147
tpact_tests, remaining_tests = tests.split_suite_by_condition(
148
148
remaining_tests, tests.condition_isinstance((
151
151
activity_scenarios = [
152
('http', dict(_activity_server=ActivityHTTPServer)),
152
('urllib,http', dict(_activity_server=ActivityHTTPServer,
153
_transport=_urllib.HttpTransport_urllib,)),
154
155
if tests.HTTPSServerFeature.available():
155
156
activity_scenarios.append(
156
('https', dict(_activity_server=ActivityHTTPSServer)))
157
tpact_scenarios = tests.multiply_scenarios(tp_scenarios,
157
('urllib,https', dict(_activity_server=ActivityHTTPSServer,
158
_transport=_urllib.HttpTransport_urllib,)),)
160
activity_scenarios.append(
161
('pycurl,http', dict(_activity_server=ActivityHTTPServer,
162
_transport=PyCurlTransport,)),)
163
if tests.HTTPSServerFeature.available():
164
from bzrlib.tests import (
167
# FIXME: Until we have a better way to handle self-signed
168
# certificates (like allowing them in a test specific
169
# authentication.conf for example), we need some specialized pycurl
170
# transport for tests.
171
class HTTPS_pycurl_transport(PyCurlTransport):
173
def __init__(self, base, _from_transport=None):
174
super(HTTPS_pycurl_transport, self).__init__(
175
base, _from_transport)
176
self.cabundle = str(ssl_certs.build_path('ca.crt'))
178
activity_scenarios.append(
179
('pycurl,https', dict(_activity_server=ActivityHTTPSServer,
180
_transport=HTTPS_pycurl_transport,)),)
182
tpact_scenarios = tests.multiply_scenarios(activity_scenarios,
159
184
tests.multiply_tests(tpact_tests, tpact_scenarios, result)
161
186
# No parametrization for the remaining tests