escape_html bulletproofing

This commit is contained in:
Chris Caron
2019-03-10 12:24:57 -04:00
parent 268d11f181
commit 741d244c5a
2 changed files with 8 additions and 3 deletions

View File

@ -196,6 +196,11 @@ def test_notify_base():
'/path/?name=Dr%20Disrespect', unquote=True) == \
['path', '?name=Dr', 'Disrespect']
# Give nothing, get nothing
assert NotifyBase.escape_html("") == ""
assert NotifyBase.escape_html(None) == ""
assert NotifyBase.escape_html(object()) == ""
# Test quote
assert NotifyBase.unquote('%20') == ' '
assert NotifyBase.quote(' ') == '%20'