Browse Source

feat: Move setup_django to an inner module

Cristian 5 years ago
parent
commit
a6bee5f111
3 changed files with 4 additions and 5 deletions
  1. 0 4
      archivebox/__init__.py
  2. 4 0
      archivebox/cli/__init__.py
  3. 0 1
      tests/test_add.py

+ 0 - 4
archivebox/__init__.py

@@ -1,5 +1 @@
 __package__ = 'archivebox'
-from .config import setup_django, OUTPUT_DIR
-
-print(OUTPUT_DIR)
-setup_django()

+ 4 - 0
archivebox/cli/__init__.py

@@ -134,3 +134,7 @@ __all__ = (
     'run_subcommand',
     *SUBCOMMANDS.keys(),
 )
+
+
+from ..config import setup_django
+setup_django()

+ 0 - 1
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)