title handling and bulletproofing

This commit is contained in:
Chris Caron
2019-03-10 12:10:01 -04:00
parent 643dc3f561
commit 268d11f181
6 changed files with 43 additions and 6 deletions

View File

@ -3128,6 +3128,16 @@ def test_notify_overflow_truncate():
# Verify that we break the title to a max length of our title_max
# and that the body remains untouched
obj.notify_format = NotifyFormat.HTML
chunks = obj._apply_overflow(body=body, title=title)
assert len(chunks) == 1
obj.notify_format = NotifyFormat.MARKDOWN
chunks = obj._apply_overflow(body=body, title=title)
assert len(chunks) == 1
obj.notify_format = NotifyFormat.TEXT
chunks = obj._apply_overflow(body=body, title=title)
assert len(chunks) == 1