From 2441a4d7b3576eb3a1c519713974418638ab82ba Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Mon, 23 Apr 2018 16:28:43 +1000 Subject: Refactor some long statements to allow shorter lines. --- tests/db/utils_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/db/utils_test.py b/tests/db/utils_test.py index b1187fe3..9013f5ce 100644 --- a/tests/db/utils_test.py +++ b/tests/db/utils_test.py @@ -263,7 +263,9 @@ class TestDecodeHeader(unittest.TestCase): """ string = unicode_string.encode(encoding) b64 = base64.encodebytes(string).strip() - return (b'=?' + encoding.encode('utf-8') + b'?B?' + b64 + b'?=').decode('ascii') + result_bytes = b'=?' + encoding.encode('utf-8') + b'?B?' + b64 + b'?=' + result = result_bytes.decode('ascii') + return result def _test(self, teststring, expected): @@ -317,7 +319,11 @@ class TestDecodeHeader(unittest.TestCase): ' again: ' + self._quote(part, 'utf-8') + \ ' latin1: ' + self._base64(part, 'iso-8859-1') + \ ' and ' + self._quote(part, 'iso-8859-1') - expected = u'utf-8: ÄÖÜäöü again: ÄÖÜäöü latin1: ÄÖÜäöü and ÄÖÜäöü' + expected = u' '.join([ + u'utf-8: ÄÖÜäöü', + u'again: ÄÖÜäöü', + u'latin1: ÄÖÜäöü and ÄÖÜäöü', + ]) self._test(text, expected) def test_tabs_are_expanded_to_align_with_eigth_spaces(self): -- cgit v1.2.3