/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_errors.py

Move some more tests to breezy.bzr.

Merged from https://code.launchpad.net/~jelmer/brz/move-bzr-tests/+merge/386406

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
            "^Filename b?'bad/filen\\\\xe5me' is not valid in your current"
68
68
            " filesystem encoding UTF-8$")
69
69
 
70
 
    def test_duplicate_file_id(self):
71
 
        error = errors.DuplicateFileId('a_file_id', 'foo')
72
 
        self.assertEqualDiff('File id {a_file_id} already exists in inventory'
73
 
                             ' as foo', str(error))
74
 
 
75
70
    def test_duplicate_help_prefix(self):
76
71
        error = errors.DuplicateHelpPrefix('foo')
77
72
        self.assertEqualDiff('The prefix foo is in the help search path twice.',
125
120
        self.assertEqual("Invalid range access in path at 12: bad range",
126
121
                         str(error))
127
122
 
128
 
    def test_inventory_modified(self):
129
 
        error = errors.InventoryModified("a tree to be repred")
130
 
        self.assertEqualDiff("The current inventory for the tree 'a tree to "
131
 
                             "be repred' has been modified, so a clean inventory cannot be "
132
 
                             "read without data loss.",
133
 
                             str(error))
134
 
 
135
123
    def test_jail_break(self):
136
124
        error = errors.JailBreak("some url")
137
125
        self.assertEqualDiff("An attempt to access a url outside the server"
199
187
                             "the currently open request.",
200
188
                             str(error))
201
189
 
202
 
    def test_unavailable_representation(self):
203
 
        error = errors.UnavailableRepresentation(
204
 
            ('key',), "mpdiff", "fulltext")
205
 
        self.assertEqualDiff("The encoding 'mpdiff' is not available for key "
206
 
                             "('key',) which is encoded as 'fulltext'.",
207
 
                             str(error))
208
 
 
209
190
    def test_unstackable_location(self):
210
191
        error = errors.UnstackableLocationError('foo', 'bar')
211
192
        self.assertEqualDiff("The branch 'foo' cannot be stacked on 'bar'.",