Better text/plain detection and refactor tests (#443)

This commit is contained in:
dgtlmoon
2022-03-01 17:50:15 +01:00
committed by GitHub
parent 615fa2c5b2
commit 96664ffb10
6 changed files with 24 additions and 32 deletions

View File

@@ -7,6 +7,13 @@ from . util import set_original_response, set_modified_response, live_server_set
sleep_time_for_fetch_thread = 3
# Basic test to check inscriptus is not adding return line chars, basically works etc
def test_inscriptus():
from inscriptis import get_text
html_content="<html><body>test!<br/>ok man</body></html>"
stripped_text_from_html = get_text(html_content)
assert stripped_text_from_html == 'test!\nok man'
def test_check_basic_change_detection_functionality(client, live_server):
set_original_response()