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)))