~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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