This commit is contained in:
@@ -8,6 +8,7 @@ from getpass import getuser, getpass
|
||||
from pathlib import Path
|
||||
from slic.utils.elog import Elog, get_default_elog_instance
|
||||
from unittest.mock import patch
|
||||
from html import escape
|
||||
|
||||
|
||||
# Helper pour extraire uniquement le mot de passe comme dans la vraie fonction
|
||||
@@ -103,7 +104,8 @@ def test_post():
|
||||
|
||||
url = "http://localhost:8080/demo"
|
||||
response = requests.get(url)
|
||||
html = response.content.decode('utf-8')
|
||||
html = response.content.decode('iso-8859-1')
|
||||
html = escape(html)
|
||||
|
||||
assert text in html, "Message not found"
|
||||
assert author in html, f"Author not found"
|
||||
@@ -125,7 +127,8 @@ def test_screenshot(mock_screenshot_class):
|
||||
|
||||
url = f"http://localhost:8080/demo"
|
||||
response = requests.get(url)
|
||||
html = response.content.decode('utf-8')
|
||||
html = response.content.decode('iso-8859-1')
|
||||
html = escape(html)
|
||||
|
||||
filename = os.path.basename(fake_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user