mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-21 02:15:10 -04:00
tests: Add mechanism to avoid using extractors that we are not testing
This commit is contained in:
parent
3c5c6a689e
commit
5429096c30
7 changed files with 57 additions and 30 deletions
|
@ -1,12 +1,13 @@
|
|||
from .fixtures import *
|
||||
|
||||
def test_title_is_htmlencoded_in_index_html(tmp_path, process):
|
||||
def test_title_is_htmlencoded_in_index_html(tmp_path, process, disable_extractors_dict):
|
||||
"""
|
||||
https://github.com/pirate/ArchiveBox/issues/330
|
||||
Unencoded content should not be rendered as it facilitates xss injections
|
||||
and breaks the layout.
|
||||
"""
|
||||
add_process = subprocess.run(['archivebox', 'add', 'http://localhost:8080/static/title_with_html.com.html'], capture_output=True)
|
||||
add_process = subprocess.run(['archivebox', 'add', 'http://localhost:8080/static/title_with_html.com.html'],
|
||||
capture_output=True, env=disable_extractors_dict)
|
||||
|
||||
with open(tmp_path / "index.html", "r") as f:
|
||||
output_html = f.read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue