Module: check_mk
Branch: master
Commit: 3a255ae8126764221caf21cadc6fde27dc421db9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a255ae8126764…
Author: Roland Halbig <rh(a)mathias-kettner.de>
Date: Thu Jan 12 09:42:39 2017 +0100
Tests: fixed inconvenience in table test, created test shell script.
Change-Id: I5ec9d1457bb0f40f10350dae7ee8b759e847caed
---
tests/web/html_tests.sh | 6 ++++++
tests/web/test_table.py | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/tests/web/html_tests.sh b/tests/web/html_tests.sh
new file mode 100755
index 0000000..fa0b745
--- /dev/null
+++ b/tests/web/html_tests.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+pytest test_html.py
+pytest test_generator.py
+pytest test_table.py
+pytest test_htmllib_integration.py
diff --git a/tests/web/test_table.py b/tests/web/test_table.py
index 1590175..c94a34f 100644
--- a/tests/web/test_table.py
+++ b/tests/web/test_table.py
@@ -118,6 +118,11 @@ def table_test_cubical(sortable, searchable, limit, output_format):
# write to file: This is part of the test! Look at the generated HTML!
filename = "./web/testtable_%s_%s_%s.html" % ("sortable" *
sortable, "searchable" * searchable, limit)
+ try:
+ with open(filename, "w") as html_file:
+ pass
+ except:
+ filename = filename[6:]
text = html.written_text
with open(filename, "w") as html_file:
html_file.write(text)