From a6bee5f11100f0fb0901205db5fb646b46777b22 Mon Sep 17 00:00:00 2001 From: Cristian Date: Mon, 26 Oct 2020 08:02:04 -0500 Subject: [PATCH] feat: Move setup_django to an inner module --- archivebox/__init__.py | 4 ---- archivebox/cli/__init__.py | 4 ++++ tests/test_add.py | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/archivebox/__init__.py b/archivebox/__init__.py index d41776ba..b0c00b61 100644 --- a/archivebox/__init__.py +++ b/archivebox/__init__.py @@ -1,5 +1 @@ __package__ = 'archivebox' -from .config import setup_django, OUTPUT_DIR - -print(OUTPUT_DIR) -setup_django() diff --git a/archivebox/cli/__init__.py b/archivebox/cli/__init__.py index 83055e8e..f41ba5dc 100644 --- a/archivebox/cli/__init__.py +++ b/archivebox/cli/__init__.py @@ -134,3 +134,7 @@ __all__ = ( 'run_subcommand', *SUBCOMMANDS.keys(), ) + + +from ..config import setup_django +setup_django() diff --git a/tests/test_add.py b/tests/test_add.py index 37b13653..5e672e8d 100644 --- a/tests/test_add.py +++ b/tests/test_add.py @@ -32,7 +32,6 @@ def test_depth_flag_0_crawls_only_the_arg_page(tmp_path, process, disable_extrac env=disable_extractors_dict, ) - breakpoint() archived_item_path = list(tmp_path.glob('archive/**/*'))[0] with open(archived_item_path / "index.json", "r") as f: output_json = json.load(f)