summaryrefslogtreecommitdiff
path: root/python/subunit/tests/test_test_protocol.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2010-06-21 07:49:32 +1200
committerRobert Collins <robertc@robertcollins.net>2010-06-21 07:49:32 +1200
commit62523dfa4e108995245c53b211a077edee1b586f (patch)
treec87f2559054365bdb6b2fd708bc6cf5fbfcf6937 /python/subunit/tests/test_test_protocol.py
parent348614019d0d8d88914286505a0dcdf1eac92a2f (diff)
downloadsubunit-git-62523dfa4e108995245c53b211a077edee1b586f.tar.gz
Unbreak tests in trunk. Oops.
Diffstat (limited to 'python/subunit/tests/test_test_protocol.py')
-rw-r--r--python/subunit/tests/test_test_protocol.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/python/subunit/tests/test_test_protocol.py b/python/subunit/tests/test_test_protocol.py
index ae9cf53..ea4a447 100644
--- a/python/subunit/tests/test_test_protocol.py
+++ b/python/subunit/tests/test_test_protocol.py
@@ -246,7 +246,8 @@ class TestTestProtocolServerPassThrough(unittest.TestCase):
self.protocol.lineReceived("]\n")
self.assertEqual(self.stdout.getvalue(), "")
details = {}
- details['traceback'] = Content(ContentType("text", "x-traceback"),
+ details['traceback'] = Content(ContentType("text", "x-traceback",
+ {'charset': 'utf8'}),
lambda:[
"test old mcdonald\n"
"failure a\n"
@@ -414,8 +415,8 @@ class TestTestProtocolServerAddError(unittest.TestCase):
self.protocol.lineReceived("error mcdonalds farm [\n")
self.protocol.lineReceived("]\n")
details = {}
- details['traceback'] = Content(ContentType("text", "x-traceback"),
- lambda:[""])
+ details['traceback'] = Content(ContentType("text", "x-traceback",
+ {'charset': 'utf8'}), lambda:[""])
self.assertEqual([
('startTest', self.test),
('addError', self.test, details),
@@ -427,8 +428,8 @@ class TestTestProtocolServerAddError(unittest.TestCase):
self.protocol.lineReceived(" ]\n")
self.protocol.lineReceived("]\n")
details = {}
- details['traceback'] = Content(ContentType("text", "x-traceback"),
- lambda:["]\n"])
+ details['traceback'] = Content(ContentType("text", "x-traceback",
+ {'charset': 'utf8'}), lambda:["]\n"])
self.assertEqual([
('startTest', self.test),
('addError', self.test, details),
@@ -472,8 +473,8 @@ class TestTestProtocolServerAddFailure(unittest.TestCase):
self.protocol.lineReceived("failure mcdonalds farm [\n")
self.protocol.lineReceived("]\n")
details = {}
- details['traceback'] = Content(ContentType("text", "x-traceback"),
- lambda:[""])
+ details['traceback'] = Content(ContentType("text", "x-traceback",
+ {'charset': 'utf8'}), lambda:[""])
self.assertFailure(details)
def failure_quoted_bracket(self, keyword):
@@ -481,8 +482,8 @@ class TestTestProtocolServerAddFailure(unittest.TestCase):
self.protocol.lineReceived(" ]\n")
self.protocol.lineReceived("]\n")
details = {}
- details['traceback'] = Content(ContentType("text", "x-traceback"),
- lambda:["]\n"])
+ details['traceback'] = Content(ContentType("text", "x-traceback",
+ {'charset': 'utf8'}), lambda:["]\n"])
self.assertFailure(details)
def test_failure_quoted_bracket(self):
@@ -538,7 +539,8 @@ class TestTestProtocolServerAddxFail(unittest.TestCase):
details = {}
if error_message is not None:
details['traceback'] = Content(
- ContentType("text", "x-traceback"), lambda:[error_message])
+ ContentType("text", "x-traceback", {'charset': 'utf8'}),
+ lambda:[error_message])
if isinstance(self.client, ExtendedTestResult):
value = details
else:
@@ -890,8 +892,8 @@ class TestExecTestCase(unittest.TestCase):
mcdonald = subunit.RemotedTestCase("old mcdonald")
bing = subunit.RemotedTestCase("bing crosby")
bing_details = {}
- bing_details['traceback'] = Content(ContentType("text", "x-traceback"),
- lambda:["foo.c:53:ERROR invalid state\n"])
+ bing_details['traceback'] = Content(ContentType("text", "x-traceback",
+ {'charset': 'utf8'}), lambda:["foo.c:53:ERROR invalid state\n"])
an_error = subunit.RemotedTestCase("an error")
error_details = {}
self.assertEqual([