Module: check_mk
Branch: master
Commit: aa0f5053504c831b54cdc3efb048c59308e29a83
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aa0f5053504c83…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 6 08:30:49 2016 +0100
Fixed HTML tests after recode
---
tests/web/tools.py | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/tests/web/tools.py b/tests/web/tools.py
index 7a376fe..bd65676 100644
--- a/tests/web/tools.py
+++ b/tests/web/tools.py
@@ -48,10 +48,7 @@ def timeit(method):
def prettify(html_text):
- if isinstance(html_text, HTML):
- txt = bs(html_text.value, 'html5lib').prettify()
- else:
- txt = bs(html_text, 'html5lib').prettify()
+ txt = bs(html_text, 'html5lib').prettify()
return re.sub('\n{2,}', '\n', re.sub('>',
'>\n', txt))
@@ -96,13 +93,6 @@ def subber(value):
re.sub('\n', '', value))))))
def compare_soup(html1, html2):
-
- if isinstance(html1, HTML):
- html1 = html1.value
-
- if isinstance(html2, HTML):
- html2 = html2.value
-
s1 = bs(prettify(html1), 'html5lib')
s2 = bs(prettify(html2), 'html5lib')
@@ -136,14 +126,6 @@ def compare_soup(html1, html2):
def compare_html(html1, html2):
-
- if isinstance(html1, HTML):
- html1 = html1.value
-
- if isinstance(html2, HTML):
- html2 = html2.value
-
-
# compare tags
opening_1 = re.findall(r'<[^<]*>', html1)
opening_2 = re.findall(r'<[^<]*>', html2)