Skip to content
Snippets Groups Projects
Verified Commit 68d4b86a authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

deposit.tests: Cleanup some more dead code

Related to 0a9ec2a9
parent 49f6d754
No related branches found
No related tags found
1 merge request!49deposit.tests: Cleanup some more dead code
# 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 @@ def parse_deposit_config_file(base_filename=None, config_filename=None,
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')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment