Skip to content

Commit fe80a93

Browse files
committed
test: Refactor init tests to use local webserver
1 parent 8f2543f commit fe80a93

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/test_init.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_update(tmp_path, process):
1818

1919
def test_add_link(tmp_path, process):
2020
os.chdir(tmp_path)
21-
add_process = subprocess.run(['archivebox', 'add', 'http://example.com'], capture_output=True)
21+
add_process = subprocess.run(['archivebox', 'add', 'http://localhost:8080/static/example.com.html'], capture_output=True)
2222
archived_item_path = list(tmp_path.glob('archive/**/*'))[0]
2323

2424
assert "index.json" in [x.name for x in archived_item_path.iterdir()]
@@ -34,7 +34,7 @@ def test_add_link(tmp_path, process):
3434
def test_add_link_support_stdin(tmp_path, process):
3535
os.chdir(tmp_path)
3636
stdin_process = subprocess.Popen(["archivebox", "add"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
37-
stdin_process.communicate(input="http://example.com".encode())
37+
stdin_process.communicate(input="http://localhost:8080/static/example.com.html".encode())
3838
archived_item_path = list(tmp_path.glob('archive/**/*'))[0]
3939

4040
assert "index.json" in [x.name for x in archived_item_path.iterdir()]

0 commit comments

Comments
 (0)