~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009, 2010, 2016 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
34
34
        tree = self.create_simple_tree()
35
35
        dir = self.make_repository('dir').bzrdir
36
36
        result = dir.push_branch(tree.branch)
37
 
        self.assertEquals(tree.branch, result.source_branch)
38
 
        self.assertEquals(dir.open_branch().base, result.target_branch.base)
39
 
        self.assertEquals(dir.open_branch().base,
 
37
        self.assertEqual(tree.branch, result.source_branch)
 
38
        self.assertEqual(dir.open_branch().base, result.target_branch.base)
 
39
        self.assertEqual(dir.open_branch().base,
40
40
            tree.branch.get_push_location())
41
41
 
42
42
    def test_push_new_empty(self):
43
43
        tree = self.make_branch_and_tree('tree')
44
44
        dir = self.make_repository('dir').bzrdir
45
45
        result = dir.push_branch(tree.branch)
46
 
        self.assertEquals(tree.branch.base, result.source_branch.base)
47
 
        self.assertEquals(dir.open_branch().base,
 
46
        self.assertEqual(tree.branch.base, result.source_branch.base)
 
47
        self.assertEqual(dir.open_branch().base,
48
48
            result.target_branch.base)
49
49
 
50
50
    def test_push_incremental(self):
55
55
        tree.add(['b'])
56
56
        tree.commit('two', rev_id='r2')
57
57
        result = dir.push_branch(tree.branch)
58
 
        self.assertEquals(tree.last_revision(),
 
58
        self.assertEqual(tree.last_revision(),
59
59
            result.branch_push_result.new_revid)
60
 
        self.assertEquals(2, result.branch_push_result.new_revno)
61
 
        self.assertEquals(tree.branch.base, result.source_branch.base)
62
 
        self.assertEquals(dir.open_branch().base, result.target_branch.base)
 
60
        self.assertEqual(2, result.branch_push_result.new_revno)
 
61
        self.assertEqual(tree.branch.base, result.source_branch.base)
 
62
        self.assertEqual(dir.open_branch().base, result.target_branch.base)