diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 311e0cfe3cc942ef8925f11ee8ddfa65303fa1f1..66d2478c708368d55d7d192359c4ac83c5e2f143 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -768,10 +768,16 @@ class RunnerSimpleTest(unittest.TestCase): "results.html")) as html_res: html_results = html_res.read() # test results should replace odd chars with "_" - self.assertIn(os.path.join("test-results", "1-'________'"), - html_results) + # HTML could contain either the literal char, or an entity reference + test1_href = (os.path.join("test-results", + "1-'________'") in html_results or + os.path.join("test-results", + "1-'________'") in html_results) + self.assertTrue(test1_href) # sysinfo replaces "_" with " " - self.assertIn("echo '________'", html_results) + sysinfo = ("echo '________'" in html_results or + "echo '________'" in html_results) + self.assertTrue(sysinfo) def test_non_absolute_path(self): avocado_path = os.path.join(basedir, 'scripts', 'avocado')