273
273
"Could not understand response from smart server: ('not yes',)",
276
def test_unknown_container_format(self):
277
"""Test the formatting of UnknownContainerFormatError."""
278
e = errors.UnknownContainerFormatError('bad format string')
280
"Unrecognised container format: 'bad format string'",
283
def test_unexpected_end_of_container(self):
284
"""Test the formatting of UnexpectedEndOfContainerError."""
285
e = errors.UnexpectedEndOfContainerError()
287
"Unexpected end of container stream", str(e))
289
def test_unknown_record_type(self):
290
"""Test the formatting of UnknownRecordTypeError."""
291
e = errors.UnknownRecordTypeError("X")
293
"Unknown record type: 'X'",
296
def test_invalid_record(self):
297
"""Test the formatting of InvalidRecordError."""
298
e = errors.InvalidRecordError("xxx")
300
"Invalid record: xxx",
303
def test_container_has_excess_data(self):
304
"""Test the formatting of ContainerHasExcessDataError."""
305
e = errors.ContainerHasExcessDataError("excess bytes")
307
"Container has data after end marker: 'excess bytes'",
310
def test_duplicate_record_name_error(self):
311
"""Test the formatting of DuplicateRecordNameError."""
312
e = errors.DuplicateRecordNameError(u"n\xe5me".encode('utf-8'))
314
"Container has multiple records with the same name: \"n\xc3\xa5me\"",
277
318
class PassThroughError(errors.BzrError):