Page MenuHomeSoftware Heritage

D2446.id8703.diff
No OneTemporary

D2446.id8703.diff

diff --git a/swh/deposit/tests/__init__.py b/swh/deposit/tests/__init__.py
--- a/swh/deposit/tests/__init__.py
+++ b/swh/deposit/tests/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 The Software Heritage developers
+# Copyright (C) 2017-2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -6,8 +6,6 @@
from swh.deposit.config import setup_django_for
from swh.deposit.config import SWHDefaultConfig # noqa
-from swh.loader.core.loader import BufferedLoader
-
TEST_CONFIG = {
'max_upload_size': 500,
@@ -35,39 +33,10 @@
return TEST_CONFIG
-TEST_LOADER_CONFIG = {
- 'extraction_dir': '/tmp/swh-loader-tar/test/',
- 'working_dir': '/tmp/swh-loader-tar/test/working-dir',
- 'debug': False,
- 'storage': {
- 'cls': 'memory',
- 'args': {
- }
- },
- 'send_contents': True,
- 'send_directories': True,
- 'send_revisions': True,
- 'send_releases': True,
- 'send_snapshot': True,
-
- 'content_size_limit': 100 * 1024 * 1024,
- 'content_packet_size': 10,
- 'content_packet_size_bytes': 100 * 1024 * 1024,
- 'directory_packet_size': 10,
- 'revision_packet_size': 10,
- 'release_packet_size': 10,
-}
-
-
-def parse_loader_config_file(base_filename=None, config_filename=None,
- additional_configs=None, global_config=True):
- return TEST_LOADER_CONFIG
-
-
# monkey patch classes method permits to override, for tests purposes,
# the default configuration without side-effect, i.e do not load the
# configuration from disk
SWHDefaultConfig.parse_config_file = parse_deposit_config_file # type: ignore
-BufferedLoader.parse_config_file = parse_loader_config_file # type: ignore
+
setup_django_for('testing')

File Metadata

Mime Type
text/plain
Expires
Jul 3 2025, 8:54 AM (6 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3227207

Event Timeline