summaryrefslogtreecommitdiff
path: root/python/subunit/tests/test_details.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2009-10-24 19:24:09 +1100
committerRobert Collins <robertc@robertcollins.net>2009-10-24 19:24:09 +1100
commitab0aada6011a4d0db688de56cffef931d5585629 (patch)
tree44a15a4b47f92a139bc9b9ea6bbced81149e7320 /python/subunit/tests/test_details.py
parent1397750c1112952370adbd70f5e19745de8691be (diff)
downloadsubunit-git-ab0aada6011a4d0db688de56cffef931d5585629.tar.gz
change error reports to use the extended details interface.
Diffstat (limited to 'python/subunit/tests/test_details.py')
-rw-r--r--python/subunit/tests/test_details.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/python/subunit/tests/test_details.py b/python/subunit/tests/test_details.py
index f76d505..5873ee7 100644
--- a/python/subunit/tests/test_details.py
+++ b/python/subunit/tests/test_details.py
@@ -46,9 +46,19 @@ class TestSimpleDetails(unittest.TestCase):
parser = details.SimpleDetailsParser(None)
self.assertEqual("", parser.get_message())
- def test_get_details_is_None(self):
+ def test_get_details(self):
parser = details.SimpleDetailsParser(None)
- self.assertEqual(None, parser.get_details())
+ traceback = ""
+ expected = {}
+ expected['traceback'] = content.Content(
+ content_type.ContentType("text", "x-traceback"),
+ lambda:[""])
+ found = parser.get_details()
+ self.assertEqual(expected.keys(), found.keys())
+ self.assertEqual(expected['traceback'].content_type,
+ found['traceback'].content_type)
+ self.assertEqual(''.join(expected['traceback'].iter_bytes()),
+ ''.join(found['traceback'].iter_bytes()))
class TestMultipartDetails(unittest.TestCase):