diff core/tests/test_html.py @ 985:9b197dbba34b

Fix image_check so it doesn't choke on empty input. Issue #88.
author Brian Neal <bgneal@gmail.com>
date Sun, 25 Oct 2015 13:54:56 -0500
parents 4f265f61874b
children
line wrap: on
line diff
--- a/core/tests/test_html.py	Sun Oct 25 13:28:19 2015 -0500
+++ b/core/tests/test_html.py	Sun Oct 25 13:54:56 2015 -0500
@@ -66,3 +66,11 @@
         html = TEST_HTML.format(src1=url1, src2=url2)
 
         self.assertRaises(ImageCheckError, image_check, html, self.allowed_hosts)
+
+    def test_empty_string(self):
+        result = image_check('')
+        self.assertTrue(result)
+
+    def test_whitespace(self):
+        result = image_check('\r\n\r\n')
+        self.assertTrue(result)