~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-08 12:06:24 UTC
  • mfrom: (5015.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100208120624-zqc1nk5x9hltgmiu
(vila)(trivial) Simplify some tests in
        per_workingtree/test_smart_add.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
36
36
    pathfilter,
37
37
    readonly,
38
38
    )
39
 
from bzrlib.tests import (
40
 
    features,
41
 
    test_server,
42
 
    )
 
39
from bzrlib.tests import features
43
40
 
44
41
 
45
42
# TODO: Should possibly split transport-specific tests into their own files.
596
593
 
597
594
    def test_fakenfs_server_default(self):
598
595
        # a FakeNFSServer() should bring up a local relpath server for itself
599
 
        server = test_server.FakeNFSServer()
 
596
        server = fakenfs.FakeNFSServer()
600
597
        self.start_server(server)
601
598
        # the url should be decorated appropriately
602
599
        self.assertStartsWith(server.get_url(), 'fakenfs+')
909
906
        # SFTPFullAbsoluteServer has a get_url method, and doesn't
910
907
        # override the interface (doesn't change self._vendor).
911
908
        # Note that this does encryption, so can be slow.
912
 
        from bzrlib.tests import stub_sftp
 
909
        from bzrlib.transport.sftp import SFTPFullAbsoluteServer
 
910
        from bzrlib.tests.stub_sftp import StubServer
913
911
 
914
912
        # Start an SSH server
915
913
        self.command_executed = []
918
916
        # SSH channel ourselves.  Surely this has already been implemented
919
917
        # elsewhere?
920
918
        started = []
921
 
        class StubSSHServer(stub_sftp.StubServer):
 
919
        class StubSSHServer(StubServer):
922
920
 
923
921
            test = self
924
922
 
952
950
 
953
951
                return True
954
952
 
955
 
        ssh_server = stub_sftp.SFTPFullAbsoluteServer(StubSSHServer)
 
953
        ssh_server = SFTPFullAbsoluteServer(StubSSHServer)
956
954
        # We *don't* want to override the default SSH vendor: the detected one
957
955
        # is the one to use.
958
956
        self.start_server(ssh_server)