Commit e879c6f9 authored by Romain Courteaud's avatar Romain Courteaud

testXHTML: use the global validator to check static html files

Reduce duplicated code.
parent c0707087
...@@ -225,14 +225,6 @@ class TestXHTMLMixin(ERP5TypeTestCase): ...@@ -225,14 +225,6 @@ class TestXHTMLMixin(ERP5TypeTestCase):
self.fail(message) self.fail(message)
def test_html_file(self): def test_html_file(self):
path_list = os.environ.get('CGI_PATH',
'/usr/lib/cgi-bin:/usr/lib/cgi-bin/w3c-markup-validator').split(os.pathsep)
for path in path_list:
validator_path = os.path.join(path, 'check')
if os.path.exists(validator_path):
validator = W3Validator(validator_path, show_warnings)
break
if validator is not None:
skins_tool = self.portal.portal_skins skins_tool = self.portal.portal_skins
path_list = [] path_list = []
for script_path, script in skins_tool.ZopeFind( for script_path, script in skins_tool.ZopeFind(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment