Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Merge requests
!2270
Remove thumbnail generation from process
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Remove thumbnail generation from process
remove-thumbnail-gen
into
master
Overview
3
Commits
10
Pipelines
0
Changes
1
Merged
Theo Lesage
requested to merge
remove-thumbnail-gen
into
master
11 months ago
Overview
3
Commits
10
Pipelines
0
Changes
1
Expand
Closes
#1715 (closed)
0
0
Merge request reports
Viewing commit
da48a56d
Show latest version
1 file
+
7
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
da48a56d
Accelerate execution of test_task_details
· da48a56d
Valentin Rigal
authored
1 year ago
arkindex/ponos/tests/test_api.py
+
7
−
8
Options
@@ -111,19 +111,18 @@ class TestAPI(FixtureAPITestCase):
resp
=
self
.
client
.
get
(
reverse
(
"
api:task-details
"
,
args
=
[
self
.
task1
.
id
]))
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_403_FORBIDDEN
)
@expectedFailure
def
test_task_details_requires_process_guest
(
self
):
self
.
process
.
creator
=
self
.
superuser
self
.
process
.
save
()
self
.
corpus
.
memberships
.
filter
(
user
=
self
.
user
).
delete
()
self
.
corpus
.
public
=
False
self
.
corpus
.
save
()
@patch
(
"
arkindex.project.mixins.get_max_level
"
)
def
test_task_details_requires_process_guest
(
self
,
get_max_level_mock
):
get_max_level_mock
.
return_value
=
None
self
.
client
.
force_login
(
self
.
user
)
with
self
.
assertNumQueries
(
5
):
with
self
.
assertNumQueries
(
3
):
resp
=
self
.
client
.
get
(
reverse
(
"
api:task-details
"
,
args
=
[
self
.
task1
.
id
]))
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_403_FORBIDDEN
)
self
.
assertEqual
(
get_max_level_mock
.
call_count
,
1
)
self
.
assertEqual
(
get_max_level_mock
.
call_args
,
call
(
self
.
user
,
self
.
corpus
))
@patch
(
"
arkindex.project.aws.s3
"
)
def
test_task_details_process_level_corpus
(
self
,
s3_mock
):
s3_mock
.
Object
.
return_value
.
bucket_name
=
"
ponos
"
Loading