~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2010-06-17 09:23:19 UTC
  • mfrom: (5301 +trunk)
  • mto: (5247.1.8 first-try)
  • mto: This revision was merged to the branch mainline in revision 5326.
  • Revision ID: v.ladeuil+lp@free.fr-20100617092319-da2bzdtf3j0voynf
Merge bzr.dev into cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 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
76
76
    def test_pull_raises_specific_error_on_master_connection_error(self):
77
77
        master_tree = self.make_from_branch_and_tree('master')
78
78
        checkout = master_tree.branch.create_checkout('checkout')
79
 
        other = self.sprout_to(master_tree.branch.bzrdir, 'other').open_workingtree()
 
79
        other = self.sprout_to(master_tree.branch.bzrdir, 'other').open_branch()
80
80
        # move the branch out of the way on disk to cause a connection
81
81
        # error.
82
82
        os.rename('master', 'master_gone')
83
83
        # try to pull, which should raise a BoundBranchConnectionFailure.
84
84
        self.assertRaises(errors.BoundBranchConnectionFailure,
85
 
                checkout.branch.pull, other.branch)
 
85
                checkout.branch.pull, other)
86
86
 
87
87
    def test_pull_returns_result(self):
88
88
        parent = self.make_from_branch_and_tree('parent')