~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/commands/test_push.py

  • Committer: Vincent Ladeuil
  • Date: 2007-07-20 16:57:41 UTC
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070720165741-a15p58sjtdm8qd6i
Update from review comments.

* bzrlib/tests/blackbox/test_branch.py:
(TestRemoteBranch): New class ensuring that working trees are not
created remotely.

* bzrlib/transport/sftp.py:
(SFTPTransport.__init__): Make from_transport parameter private.

* bzrlib/transport/remote.py:
(RemoteTransport.__init__): Make from_transport parameter private.
(RemoteHTTPTransport.__init__): Make from_transport parameter private.
(RemoteHTTPTransport.clone): Use _from_transport as a keyword
parameter.

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): Make from_transport parameter private.

* bzrlib/transport/http/_pycurl.py:
(PyCurlTransport.__init__): Make from_transport parameter private.

* bzrlib/transport/http/__init__.py:
(HttpTransportBase.__init__): Make from_transport parameter private.

* bzrlib/transport/ftp.py:
(FtpTransport.__init__): Make from_transport parameter private.

* bzrlib/transport/__init__.py:
(ConnectedTransport.__init__): Make from_transport parameter private.
(ConnectedTransport.clone, ConnectedTransport._reuse_for): Use
_from_transport as a keyword parameter.

* bzrlib/tests/commands/test_push.py:
(TestPush.test_push): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/tests/commands/test_pull.py:
(TestPull.test_pull): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/tests/commands/test_missing.py:
(TestMissing.test_missing): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/tests/commands/test_merge.py:
(TestMerge.test_merge): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/tests/commands/test_init_repository.py:
(TestInitRepository.setUp): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/tests/commands/test_init.py:
(TestInit.setUp): Don't add self.reset_hooks to cleanup, install_hooks
did it.

* bzrlib/tests/commands/test_checkout.py:
(TestCheckout.test_checkout): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/tests/commands/test_cat.py:
(TestCat.test_cat): Don't add self.reset_hooks to cleanup,
install_hooks did it. Skip the test until sftp transport/server problem
is fixed.

* bzrlib/tests/commands/test_branch.py:
(TestBranch.setUp): Don't add self.reset_hooks to cleanup,
install_hooks did it.

* bzrlib/builtins.py:
(_get_bundle_helper): New function. Factored out from merge and pull.
(cmd_pull.run, cmd_merge.run): Use _get_bundle_helper.
(_merge_helper): Add possible_transports as the last parameter.

* bzrlib/tests/transport_util.py: 
Renamed from bzrlib/tests/TransportUtil.py.  Switch from ftp to sftp
transport and server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 
18
18
from bzrlib.builtins import cmd_push
19
 
from bzrlib.tests.TransportUtil import TestCaseWithConnectionHookedTransport
 
19
from bzrlib.tests.transport_util import TestCaseWithConnectionHookedTransport
 
20
 
20
21
 
21
22
class TestPush(TestCaseWithConnectionHookedTransport):
22
23
 
24
25
        self.make_branch_and_tree('branch')
25
26
 
26
27
        self.install_hooks()
27
 
        self.addCleanup(self.reset_hooks)
28
28
 
29
29
        cmd = cmd_push()
30
 
        cmd.run(self.get_url() + 'remote', directory='branch')
 
30
        cmd.run(self.get_url('remote'), directory='branch')
31
31
        self.assertEquals(1, len(self.connections))
32
32