diff options
Diffstat (limited to 'lib/testtools/testtools/content.py')
-rw-r--r-- | lib/testtools/testtools/content.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/testtools/testtools/content.py b/lib/testtools/testtools/content.py index 353e3f0f46..843133aa1a 100644 --- a/lib/testtools/testtools/content.py +++ b/lib/testtools/testtools/content.py @@ -3,10 +3,10 @@ """Content - a MIME-like Content object.""" import codecs -from unittest import TestResult +from testtools.compat import _b from testtools.content_type import ContentType -from testtools.utils import _b +from testtools.testresult import TestResult class Content(object): @@ -86,6 +86,6 @@ class TracebackContent(Content): content_type = ContentType('text', 'x-traceback', {"language": "python", "charset": "utf8"}) self._result = TestResult() - value = self._result._exc_info_to_string(err, test) + value = self._result._exc_info_to_unicode(err, test) super(TracebackContent, self).__init__( content_type, lambda: [value.encode("utf8")]) |