230
230
self.assertEqual(tests[1].transport_readonly_server, server2)
233
class TestBzrDirProviderAdapter(TestCase):
234
"""A group of tests that test the bzr dir implementation test adapter."""
236
def test_adapted_tests(self):
237
# check that constructor parameters are passed through to the adapted
239
from bzrlib.bzrdir import BzrDirTestProviderAdapter
240
input_test = TestBzrDirProviderAdapter(
241
"test_adapted_tests")
245
adapter = BzrDirTestProviderAdapter(server1, server2, formats)
246
suite = adapter.adapt(input_test)
247
tests = list(iter(suite))
248
self.assertEqual(2, len(tests))
249
self.assertEqual(tests[0].bzrdir_format, formats[0])
250
self.assertEqual(tests[0].transport_server, server1)
251
self.assertEqual(tests[0].transport_readonly_server, server2)
252
self.assertEqual(tests[1].bzrdir_format, formats[1])
253
self.assertEqual(tests[1].transport_server, server1)
254
self.assertEqual(tests[1].transport_readonly_server, server2)
233
257
class TestTestCaseWithTransport(TestCaseWithTransport):
234
258
"""Tests for the convenience functions TestCaseWithTransport introduces."""