~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Shannon Weyrick
  • Date: 2011-11-04 13:40:04 UTC
  • mfrom: (6238 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6256.
  • Revision ID: weyrick@mozek.us-20111104134004-033t2wqhc3ydzm0a
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for branch.push behaviour."""
18
18
 
19
19
from cStringIO import StringIO
20
 
import os
21
20
 
22
21
from testtools.matchers import (
23
22
    Equals,
119
118
        other = other_bzrdir.open_workingtree()
120
119
        # move the branch out of the way on disk to cause a connection
121
120
        # error.
122
 
        os.rename('master', 'master_gone')
 
121
        master_tree.bzrdir.destroy_branch()
123
122
        # try to push, which should raise a BoundBranchConnectionFailure.
124
123
        self.assertRaises(errors.BoundBranchConnectionFailure,
125
124
                other.branch.push, checkout.branch)
370
369
        target.add('')
371
370
        rev1 = target.commit('rev 1')
372
371
        target.unlock()
373
 
        sourcedir = target.bzrdir.clone(self.get_url('source'))
 
372
        sourcedir = target.branch.bzrdir.clone(self.get_url('source'))
374
373
        source = MemoryTree.create_on_branch(sourcedir.open_branch())
375
374
        rev2 = source.commit('rev 2')
376
375
        Branch.hooks.install_named_hook('post_push',