from core.html import html_to_plaintext, sanitize_post def test_html_to_plaintext(): assert html_to_plaintext("

Hi!

") == "Hi!" assert html_to_plaintext("

Hi!
There

") == "Hi!\nThere" assert ( html_to_plaintext("

Hi!

\n\n

How are you?

") == "Hi!\n\nHow are you?" ) assert ( html_to_plaintext("

Hi!

\n\n

How are
you?

today

") == "Hi!\n\nHow are\n you?\n\ntoday" ) def test_sanitize_post(): assert sanitize_post("

Hello!

") == "

Hello!

" assert sanitize_post("

It's great

") == "

It's great

"