summaryrefslogtreecommitdiff
path: root/markupsafe/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'markupsafe/tests.py')
-rw-r--r--markupsafe/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/markupsafe/tests.py b/markupsafe/tests.py
index 7c81cda..77a0efb 100644
--- a/markupsafe/tests.py
+++ b/markupsafe/tests.py
@@ -1,6 +1,6 @@
import gc
import unittest
-from markupsafe import Markup, escape
+from markupsafe import Markup, escape, escape_silent
class MarkupTestCase(unittest.TestCase):
@@ -45,6 +45,11 @@ class MarkupTestCase(unittest.TestCase):
for item in markup.__all__:
getattr(markup, item)
+ def test_escape_silent(self):
+ assert escape_silent(None) == Markup()
+ assert escape(None) == Markup(None)
+ assert escape_silent('<foo>') == Markup(u'&lt;foo&gt;')
+
class MarkupLeakTestCase(unittest.TestCase):