mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
tests: Update failing tests
This commit is contained in:
parent
0ec747f64e
commit
dc87d8b68c
2 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,6 @@ def get_html(link: Link, path: Path) -> str:
|
||||||
abs_path = path.absolute()
|
abs_path = path.absolute()
|
||||||
sources = [canonical["wget_path"], canonical["singlefile_path"], canonical["dom_path"]]
|
sources = [canonical["wget_path"], canonical["singlefile_path"], canonical["dom_path"]]
|
||||||
document = None
|
document = None
|
||||||
breakpoint()
|
|
||||||
for source in sources:
|
for source in sources:
|
||||||
try:
|
try:
|
||||||
with open(abs_path / source, "r") as f:
|
with open(abs_path / source, "r") as f:
|
||||||
|
|
|
@ -19,6 +19,7 @@ def test_update(tmp_path, process):
|
||||||
assert "Updating existing ArchiveBox collection in this folder" in update_process.stdout.decode("utf-8")
|
assert "Updating existing ArchiveBox collection in this folder" in update_process.stdout.decode("utf-8")
|
||||||
|
|
||||||
def test_add_link(tmp_path, process, disable_extractors_dict):
|
def test_add_link(tmp_path, process, disable_extractors_dict):
|
||||||
|
disable_extractors_dict.update({"USE_WGET": "true"})
|
||||||
os.chdir(tmp_path)
|
os.chdir(tmp_path)
|
||||||
add_process = subprocess.run(['archivebox', 'add', 'http://127.0.0.1:8080/static/example.com.html'],
|
add_process = subprocess.run(['archivebox', 'add', 'http://127.0.0.1:8080/static/example.com.html'],
|
||||||
capture_output=True, env=disable_extractors_dict)
|
capture_output=True, env=disable_extractors_dict)
|
||||||
|
@ -35,6 +36,7 @@ def test_add_link(tmp_path, process, disable_extractors_dict):
|
||||||
assert "Example Domain" in output_html
|
assert "Example Domain" in output_html
|
||||||
|
|
||||||
def test_add_link_support_stdin(tmp_path, process, disable_extractors_dict):
|
def test_add_link_support_stdin(tmp_path, process, disable_extractors_dict):
|
||||||
|
disable_extractors_dict.update({"USE_WGET": "true"})
|
||||||
os.chdir(tmp_path)
|
os.chdir(tmp_path)
|
||||||
stdin_process = subprocess.Popen(["archivebox", "add"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
stdin_process = subprocess.Popen(["archivebox", "add"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||||
env=disable_extractors_dict)
|
env=disable_extractors_dict)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue