From 21e9a31ffe981ae9d58b4143b478b89232875d8d Mon Sep 17 00:00:00 2001 From: Sergey Obukhov Date: Tue, 9 Aug 2016 17:15:49 -0700 Subject: [PATCH] add test --- tests/html_quotations_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/html_quotations_test.py b/tests/html_quotations_test.py index c155cbb..03c66a8 100644 --- a/tests/html_quotations_test.py +++ b/tests/html_quotations_test.py @@ -380,3 +380,15 @@ def test_gmail_forwarded_msg():
""" extracted = quotations.extract_from_html(msg_body) eq_(RE_WHITESPACE.sub('', msg_body), RE_WHITESPACE.sub('', extracted)) + + +@patch.object(quotations, 'MAX_HTML_LEN', 1) +def test_too_large_html(): + msg_body = 'Reply' \ + '
' \ + '
On 11-Apr-2011, at 6:54 PM, Bob <bob@example.com> wrote:' \ + '
Test
' \ + '
' \ + '
' + eq_(RE_WHITESPACE.sub('', msg_body), + RE_WHITESPACE.sub('', quotations.extract_from_html(msg_body)))