/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-03 14:08:55 UTC
  • mto: (4797.12.1 2.1-integration)
  • mto: This revision was merged to the branch mainline in revision 5017.
  • Revision ID: v.ladeuil+lp@free.fr-20100203140855-yuwq660bb3jayr1d
Stop requiring testtools for sftp use.

* bzrlib/transport/sftp.py: 
Move the test servers code to tests.stub_sftp.
(get_test_permutations): Import the test servers only when the
tests are run.

* bzrlib/tests/test_transport.py:
(TestSSHConnections.test_bzr_connect_to_bzr_ssh): Get the tests
servers from tests.stub_sftp.

* bzrlib/tests/test_sftp_transport.py: 
Get the tests servers  from tests.stub_sftp.

* bzrlib/tests/stub_sftp.py: 
Fix imports, move the test servers code from transport.sftp.

* bzrlib/tests/blackbox/test_selftest.py: 
Fix imports.

* bzrlib/builtins.py:
(cmd_selftest.get_transport_type): Fix the test sftp server
import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3444
3444
    def get_transport_type(typestring):
3445
3445
        """Parse and return a transport specifier."""
3446
3446
        if typestring == "sftp":
3447
 
            from bzrlib.transport.sftp import SFTPAbsoluteServer
3448
 
            return SFTPAbsoluteServer
 
3447
            from bzrlib.tests import stub_sftp
 
3448
            return stub_sftp.SFTPAbsoluteServer
3449
3449
        if typestring == "memory":
3450
3450
            from bzrlib.transport.memory import MemoryServer
3451
3451
            return MemoryServer