~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_directory_service.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) 2008-2012 Canonical Ltd
 
1
# Copyright (C) 2008-2012, 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
71
71
 
72
72
    def assertAliasFromBranch(self, setter, value, alias):
73
73
        setter(value)
74
 
        self.assertEquals(value, directories.dereference(alias))
 
74
        self.assertEqual(value, directories.dereference(alias))
75
75
 
76
76
    def test_lookup_parent(self):
77
77
        self.assertAliasFromBranch(self.branch.set_parent, 'http://a',
115
115
        self.addCleanup(AliasDirectory.branch_aliases.remove, "booga")
116
116
        AliasDirectory.branch_aliases.register("booga",
117
117
            lambda b: "UHH?", help="Nobody knows")
118
 
        self.assertEquals("UHH?", directories.dereference(":booga"))
 
118
        self.assertEqual("UHH?", directories.dereference(":booga"))
119
119
 
120
120
 
121
121
class TestColocatedDirectory(TestCaseWithTransport):
123
123
    def test_lookup_non_default(self):
124
124
        default = self.make_branch('.')
125
125
        non_default = default.bzrdir.create_branch(name='nondefault')
126
 
        self.assertEquals(non_default.base, directories.dereference('co:nondefault'))
 
126
        self.assertEqual(non_default.base, directories.dereference('co:nondefault'))
127
127
 
128
128
    def test_lookup_default(self):
129
129
        default = self.make_branch('.')
130
130
        non_default = default.bzrdir.create_branch(name='nondefault')
131
 
        self.assertEquals(urlutils.join_segment_parameters(default.bzrdir.user_url,
 
131
        self.assertEqual(urlutils.join_segment_parameters(default.bzrdir.user_url,
132
132
            {"branch": ""}), directories.dereference('co:'))
133
133
 
134
134
    def test_no_such_branch(self):
135
135
        # No error is raised in this case, that is up to the code that actually
136
136
        # opens the branch.
137
137
        default = self.make_branch('.')
138
 
        self.assertEquals(urlutils.join_segment_parameters(default.bzrdir.user_url,
 
138
        self.assertEqual(urlutils.join_segment_parameters(default.bzrdir.user_url,
139
139
            {"branch": "foo"}), directories.dereference('co:foo'))