diff --git a/tests/end2end/test_mhtml_e2e.py b/tests/end2end/test_mhtml_e2e.py
index 953824b8c..27fdd2abf 100644
--- a/tests/end2end/test_mhtml_e2e.py
+++ b/tests/end2end/test_mhtml_e2e.py
@@ -61,8 +61,8 @@ def normalize_line(line):
return line
-def normalize_whole(s):
- if qtutils.version_check('5.12', compiled=False):
+def normalize_whole(s, webengine):
+ if qtutils.version_check('5.12', compiled=False) and webengine:
s = s.replace('\n\n-----=_qute-UUID', '\n-----=_qute-UUID')
return s
@@ -71,8 +71,9 @@ class DownloadDir:
"""Abstraction over a download directory."""
- def __init__(self, tmpdir):
+ def __init__(self, tmpdir, config):
self._tmpdir = tmpdir
+ self._config = config
self.location = str(tmpdir)
def read_file(self):
@@ -92,14 +93,15 @@ class DownloadDir:
if normalize_line(line) is not None)
actual_data = '\n'.join(normalize_line(line)
for line in self.read_file())
- actual_data = normalize_whole(actual_data)
+ actual_data = normalize_whole(actual_data,
+ webengine=self._config.webengine)
assert actual_data == expected_data
@pytest.fixture
-def download_dir(tmpdir):
- return DownloadDir(tmpdir)
+def download_dir(tmpdir, pytestconfig):
+ return DownloadDir(tmpdir, pytestconfig)
def _test_mhtml_requests(test_dir, test_path, server):