~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    )
55
55
from bzrlib.repofmt import groupcompress_repo, pack_repo
56
56
from bzrlib.revision import NULL_REVISION
57
 
from bzrlib.smart import medium
 
57
from bzrlib.smart import server, medium
58
58
from bzrlib.smart.client import _SmartClient
59
59
from bzrlib.smart.repository import SmartServerRepositoryGetParentMap
60
60
from bzrlib.tests import (
61
61
    condition_isinstance,
62
62
    split_suite_by_condition,
63
63
    multiply_tests,
64
 
    test_server,
65
64
    )
66
65
from bzrlib.transport import get_transport
67
66
from bzrlib.transport.memory import MemoryTransport
76
75
        standard_tests, condition_isinstance(BasicRemoteObjectTests))
77
76
    smart_server_version_scenarios = [
78
77
        ('HPSS-v2',
79
 
         {'transport_server': test_server.SmartTCPServer_for_testing_v2_only}),
 
78
            {'transport_server': server.SmartTCPServer_for_testing_v2_only}),
80
79
        ('HPSS-v3',
81
 
         {'transport_server': test_server.SmartTCPServer_for_testing})]
 
80
            {'transport_server': server.SmartTCPServer_for_testing})]
82
81
    return multiply_tests(to_adapt, smart_server_version_scenarios, result)
83
82
 
84
83
 
2075
2074
 
2076
2075
    def test_allows_new_revisions(self):
2077
2076
        """get_parent_map's results can be updated by commit."""
2078
 
        smart_server = test_server.SmartTCPServer_for_testing()
 
2077
        smart_server = server.SmartTCPServer_for_testing()
2079
2078
        self.start_server(smart_server)
2080
2079
        self.make_branch('branch')
2081
2080
        branch = Branch.open(smart_server.get_url() + '/branch')
2623
2622
    """RemoteRepository.copy_content_into optimizations"""
2624
2623
 
2625
2624
    def test_copy_content_remote_to_local(self):
2626
 
        self.transport_server = test_server.SmartTCPServer_for_testing
 
2625
        self.transport_server = server.SmartTCPServer_for_testing
2627
2626
        src_repo = self.make_repository('repo1')
2628
2627
        src_repo = repository.Repository.open(self.get_url('repo1'))
2629
2628
        # At the moment the tarball-based copy_content_into can't write back
2942
2941
        stacked_branch = self.make_branch('stacked', format='1.9')
2943
2942
        stacked_branch.set_stacked_on_url('../base')
2944
2943
        # start a server looking at this
2945
 
        smart_server = test_server.SmartTCPServer_for_testing()
 
2944
        smart_server = server.SmartTCPServer_for_testing()
2946
2945
        self.start_server(smart_server)
2947
2946
        remote_bzrdir = BzrDir.open(smart_server.get_url() + '/stacked')
2948
2947
        # can get its branch and repository
3104
3103
        super(TestRemoteBranchEffort, self).setUp()
3105
3104
        # Create a smart server that publishes whatever the backing VFS server
3106
3105
        # does.
3107
 
        self.smart_server = test_server.SmartTCPServer_for_testing()
 
3106
        self.smart_server = server.SmartTCPServer_for_testing()
3108
3107
        self.start_server(self.smart_server, self.get_server())
3109
3108
        # Log all HPSS calls into self.hpss_calls.
3110
3109
        _SmartClient.hooks.install_named_hook(