~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-11-27 07:07:11 UTC
  • mfrom: (3815.3.6 local-commits)
  • Revision ID: pqm@pqm.ubuntu.com-20081127070711-wvjuwbgk18345dek
(Marius) Don't access the network when doing `commit --local`.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
                          message=u'empty commit', unchanged=True)
59
59
        self.assertEquals(1, len(self.connections))
60
60
 
 
61
    def test_commit_local(self):
 
62
        """Commits with --local should not connect to the master!"""
 
63
        self.start_logging_connections()
 
64
 
 
65
        commit = builtins.cmd_commit()
 
66
        # commit do not provide a directory parameter, we have to change dir
 
67
        # manually
 
68
        os.chdir('local')
 
69
        commit.run(message=u'empty commit', unchanged=True, local=True)
 
70
 
 
71
        #it shouldn't open any connections
 
72
        self.assertEquals(0, len(self.connections))