~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd
2
2
# Authors: Robert Collins <robert.collins@canonical.com>
3
3
#          and others
4
4
#
32
32
    weaverepo,
33
33
    )
34
34
from bzrlib.remote import RemoteBzrDirFormat, RemoteRepositoryFormat
 
35
from bzrlib.smart.server import (
 
36
    ReadonlySmartTCPServer_for_testing,
 
37
    ReadonlySmartTCPServer_for_testing_v2_only,
 
38
    SmartTCPServer_for_testing,
 
39
    SmartTCPServer_for_testing_v2_only,
 
40
    )
35
41
from bzrlib.tests import (
36
 
    default_transport,
37
 
    multiply_scenarios,
38
 
    multiply_tests,
39
 
    test_server,
40
 
    )
41
 
from bzrlib.tests.per_controldir.test_controldir import TestCaseWithControlDir
42
 
from bzrlib.transport import memory
 
42
                          default_transport,
 
43
                          multiply_scenarios,
 
44
                          multiply_tests,
 
45
                          )
 
46
from bzrlib.tests.per_bzrdir.test_bzrdir import TestCaseWithBzrDir
 
47
from bzrlib.transport.memory import MemoryServer
43
48
 
44
49
 
45
50
def formats_to_scenarios(formats, transport_server, transport_readonly_server,
86
91
        None)
87
92
    format_scenarios.extend(formats_to_scenarios(
88
93
        [('-default', RemoteRepositoryFormat())],
89
 
        test_server.SmartTCPServer_for_testing,
90
 
        test_server.ReadonlySmartTCPServer_for_testing,
91
 
        memory.MemoryServer))
 
94
        SmartTCPServer_for_testing,
 
95
        ReadonlySmartTCPServer_for_testing,
 
96
        MemoryServer))
92
97
    format_scenarios.extend(formats_to_scenarios(
93
98
        [('-v2', RemoteRepositoryFormat())],
94
 
        test_server.SmartTCPServer_for_testing_v2_only,
95
 
        test_server.ReadonlySmartTCPServer_for_testing_v2_only,
96
 
        memory.MemoryServer))
 
99
        SmartTCPServer_for_testing_v2_only,
 
100
        ReadonlySmartTCPServer_for_testing_v2_only,
 
101
        MemoryServer))
97
102
    return format_scenarios
98
103
 
99
104
 
100
 
class TestCaseWithRepository(TestCaseWithControlDir):
 
105
class TestCaseWithRepository(TestCaseWithBzrDir):
101
106
 
102
107
    def make_repository(self, relpath, shared=False, format=None):
103
108
        if format is None: