Module: check_mk
Branch: master
Commit: acf0d6c171173d8ee1353f0c7d2bdef0f79ce7a0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=acf0d6c171173d…
Author: Roland Halbig <rh(a)mathias-kettner.de>
Date: Thu Dec 22 12:32:14 2016 +0100
Tested Exception conversation for html functions.
Change-Id: I599f7e75261de2fd8bede92222a81544798348ea
---
tests/web/test_generator.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/web/test_generator.py b/tests/web/test_generator.py
index 6650119..c4ec1a6 100644
--- a/tests/web/test_generator.py
+++ b/tests/web/test_generator.py
@@ -39,3 +39,10 @@ def test_HTMLGenerator():
html.close_table()
assert html.drain() ==
"<table><tr><td>1</td><td>2</td></tr></table>"
+def test_exception_handling():
+ html = HTMLGenerator()
+ html.plug()
+ try:
+ raise Exception("Test")
+ except Exception, e:
+ assert html.render_div(e) == "<div>%s</div>" % e