def test_header_strip(self): failure = '''exec ${PAGER:-/usr/bin/less} "$0" || exit 1 ----------------------------------------------------------------------------- something bad''' pkg = self.make_result(name='coal', error=failure) result = coalesce.result(pkg) self.assertEqual(result.find('failure').text, 'something bad')
def test_utf8(self): uni_string = u'\u8a66\u3057' pkg = self.make_result(name='coal', error=uni_string.encode('utf8')) result = coalesce.result(pkg) self.assertEqual(result.find('failure').text, uni_string)