Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
384c7916
Verified
Commit
384c7916
authored
Nov 06, 2021
by
Baptiste Beauplat
Browse files
Add a upload test to cover not owned file
parent
1002740f
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/functional/importer/test_upload.py
View file @
384c7916
...
@@ -213,6 +213,14 @@ C7NQGzfRMFLSPxIHVzhHvJUo6vNZ+AA=
...
@@ -213,6 +213,14 @@ C7NQGzfRMFLSPxIHVzhHvJUo6vNZ+AA=
self
.
assertEqual
(
response
.
status_code
,
403
)
self
.
assertEqual
(
response
.
status_code
,
403
)
# Next upload allowed
response
=
self
.
client
.
put
(
reverse
(
'upload'
,
args
=
[
'vitetris_0.58.0-2.dsc'
]),
data
=
'contents'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
for
filename
in
(
os
.
path
.
join
(
settings
.
UPLOAD_SPOOL
,
for
filename
in
(
os
.
path
.
join
(
settings
.
UPLOAD_SPOOL
,
'incoming'
,
'vitetris_0.58.0-1.dsc'
),
'incoming'
,
'vitetris_0.58.0-1.dsc'
),
os
.
path
.
join
(
settings
.
UPLOAD_SPOOL
,
os
.
path
.
join
(
settings
.
UPLOAD_SPOOL
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment