add test
This commit is contained in:
@@ -380,3 +380,15 @@ def test_gmail_forwarded_msg():
|
|||||||
</div><br></div>"""
|
</div><br></div>"""
|
||||||
extracted = quotations.extract_from_html(msg_body)
|
extracted = quotations.extract_from_html(msg_body)
|
||||||
eq_(RE_WHITESPACE.sub('', msg_body), RE_WHITESPACE.sub('', extracted))
|
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' \
|
||||||
|
'<div class="gmail_quote">' \
|
||||||
|
'<div class="gmail_quote">On 11-Apr-2011, at 6:54 PM, Bob <bob@example.com> wrote:' \
|
||||||
|
'<div>Test</div>' \
|
||||||
|
'</div>' \
|
||||||
|
'</div>'
|
||||||
|
eq_(RE_WHITESPACE.sub('', msg_body),
|
||||||
|
RE_WHITESPACE.sub('', quotations.extract_from_html(msg_body)))
|
||||||
|
|||||||
Reference in New Issue
Block a user