~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_bzrdir/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 10:01:21 UTC
  • mfrom: (5029.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100211100121-dqc7ja698m73k3tu
(vila) Move tests servers from bzrlib.transport to
        bzrlib.tests.test_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
from bzrlib.bzrdir import BzrDirFormat
28
28
from bzrlib.tests import (
29
 
                          default_transport,
30
 
                          multiply_tests,
31
 
                          TestCaseWithTransport,
32
 
                          )
33
 
from bzrlib.transport.memory import MemoryServer
 
29
    default_transport,
 
30
    multiply_tests,
 
31
    test_server,
 
32
    TestCaseWithTransport,
 
33
    )
 
34
from bzrlib.transport import memory
34
35
 
35
36
 
36
37
def make_scenarios(vfs_factory, transport_server, transport_readonly_server,
88
89
        None,
89
90
        formats)
90
91
    # This will always add scenarios using the smart server.
91
 
    from bzrlib.smart.server import (
92
 
        ReadonlySmartTCPServer_for_testing,
93
 
        ReadonlySmartTCPServer_for_testing_v2_only,
94
 
        SmartTCPServer_for_testing,
95
 
        SmartTCPServer_for_testing_v2_only,
96
 
        )
97
92
    from bzrlib.remote import RemoteBzrDirFormat
98
93
    # test the remote server behaviour when backed with a MemoryTransport
99
94
    # Once for the current version
100
95
    scenarios.extend(make_scenarios(
101
 
        MemoryServer,
102
 
        SmartTCPServer_for_testing,
103
 
        ReadonlySmartTCPServer_for_testing,
 
96
        memory.MemoryServer,
 
97
        test_server.SmartTCPServer_for_testing,
 
98
        test_server.ReadonlySmartTCPServer_for_testing,
104
99
        [(RemoteBzrDirFormat())],
105
100
        name_suffix='-default'))
106
101
    # And once with < 1.6 - the 'v2' protocol.
107
102
    scenarios.extend(make_scenarios(
108
 
        MemoryServer,
109
 
        SmartTCPServer_for_testing_v2_only,
110
 
        ReadonlySmartTCPServer_for_testing_v2_only,
 
103
        memory.MemoryServer,
 
104
        test_server.SmartTCPServer_for_testing_v2_only,
 
105
        test_server.ReadonlySmartTCPServer_for_testing_v2_only,
111
106
        [(RemoteBzrDirFormat())],
112
107
        name_suffix='-v2'))
113
108
    # add the tests for the sub modules