Module: check_mk
Branch: master
Commit: 4c2a1bf2193ae728ceb5f3f4c5f56e219aa709de
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c2a1bf2193ae7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 23 13:12:45 2018 +0100
Fixed OutputFunnel tests after 81415ac849f
Change-Id: I79d59ce42f1e5b3755555c83d42d72ad9dc3cbc5
---
tests/web/test_OutputFunnel.py | 22 +++++++++++-----------
tests/web/test_table.py | 4 ----
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/tests/web/test_OutputFunnel.py b/tests/web/test_OutputFunnel.py
index fbf4fdb..debdc8d 100644
--- a/tests/web/test_OutputFunnel.py
+++ b/tests/web/test_OutputFunnel.py
@@ -59,12 +59,12 @@ def test_plug():
assert html.written == "A"
html.plug()
html.write("B")
- assert html.plug_text == ["B"]
+ assert html.plug_text == [["B"]]
html.plug()
html.write("C")
- assert html.plug_text == ["B", "C"]
+ assert html.plug_text == [["B"], ["C"]]
html.unplug()
- assert html.plug_text == ["BC"]
+ assert html.plug_text == [["B", "C"]]
html.unplug()
assert html.written == "ABC"
@@ -77,7 +77,7 @@ def test_drain():
text = html.drain()
assert text == "A"
html.write("B")
- assert html.plug_text == ["B"]
+ assert html.plug_text == [["B"]]
html.unplug()
assert html.written == "B"
@@ -90,7 +90,7 @@ def test_flush():
html.plug_text == ["A"]
html.flush()
assert html.written == "A"
- assert html.plug_text == ['']
+ assert html.plug_text == [[]]
html.unplug()
assert html.written == "A"
@@ -102,11 +102,11 @@ def test_context_nesting():
assert html.written == "A"
with html.plugged():
html.write("B")
- assert html.plug_text == ["B"]
+ assert html.plug_text == [["B"]]
with html.plugged():
html.write("C")
- assert html.plug_text == ["B", "C"]
- assert html.plug_text == ["BC"]
+ assert html.plug_text == [["B"], ["C"]]
+ assert html.plug_text == [["B", "C"]]
assert html.written == "ABC"
@@ -117,9 +117,9 @@ def test_context_drain():
assert html.written == "A"
with html.plugged():
html.write("B")
- assert html.plug_text == ['B']
+ assert html.plug_text == [['B']]
code = html.drain()
- assert html.plug_text == ['']
+ assert html.plug_text == [[]]
assert code == 'B'
assert html.written == "A"
@@ -132,7 +132,7 @@ def test_context_raise():
assert html.written == "A"
with html.plugged():
html.write("B")
- assert html.plug_text == ['B']
+ assert html.plug_text == [['B']]
raise Exception("Test exception")
except Exception, e:
assert e.message == "Test exception"
diff --git a/tests/web/test_table.py b/tests/web/test_table.py
index 6bba8dc..16e924e 100644
--- a/tests/web/test_table.py
+++ b/tests/web/test_table.py
@@ -189,10 +189,6 @@ def test_nesting_context():
</table>'''), text
-def test_groupheader():
- print bcolors.WARNING + "TODO"
-
-
def test_table_wrapper(monkeypatch):
import config
monkeypatch.setattr(config, "save_user_file", save_user_mock)