Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-deposit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Development
swh-deposit
Commits
68d4b86a
Verified
Commit
68d4b86a
authored
5 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
deposit.tests: Cleanup some more dead code
Related to
0a9ec2a9
parent
49f6d754
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!49
deposit.tests: Cleanup some more dead code
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/deposit/tests/__init__.py
+2
-33
2 additions, 33 deletions
swh/deposit/tests/__init__.py
with
2 additions
and
33 deletions
swh/deposit/tests/__init__.py
+
2
−
33
View file @
68d4b86a
# 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
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment