2020-07-07 09:36:58 -04:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def process(tmp_path):
|
|
|
|
os.chdir(tmp_path)
|
2020-10-26 08:45:21 -04:00
|
|
|
print("should be at", tmp_path)
|
2020-07-07 09:36:58 -04:00
|
|
|
process = subprocess.run(['archivebox', 'init'], capture_output=True)
|
2020-08-04 09:42:30 -04:00
|
|
|
return process
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def disable_extractors_dict():
|
|
|
|
env = os.environ.copy()
|
|
|
|
env.update({
|
|
|
|
"USE_WGET": "false",
|
|
|
|
"USE_SINGLEFILE": "false",
|
2020-08-11 09:58:49 -04:00
|
|
|
"USE_READABILITY": "false",
|
2020-09-22 04:47:43 -04:00
|
|
|
"USE_MERCURY": "false",
|
2020-08-04 09:42:30 -04:00
|
|
|
"SAVE_PDF": "false",
|
|
|
|
"SAVE_SCREENSHOT": "false",
|
|
|
|
"SAVE_DOM": "false",
|
2020-09-24 09:37:27 -04:00
|
|
|
"SAVE_HEADERS": "false",
|
2020-08-04 09:42:30 -04:00
|
|
|
"USE_GIT": "false",
|
|
|
|
"SAVE_MEDIA": "false",
|
|
|
|
"SAVE_ARCHIVE_DOT_ORG": "false"
|
|
|
|
})
|
|
|
|
return env
|