File tree 1 file changed +12
-5
lines changed
tests/functional/forklift
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import pymacaroons
18
18
import pytest
19
+ from webob .multidict import MultiDict
19
20
20
21
from warehouse .macaroons import caveats
21
22
@@ -90,18 +91,24 @@ def test_file_upload(webtest):
90
91
with open ("./tests/functional/_fixtures/sampleproject-3.0.0.tar.gz" , "rb" ) as f :
91
92
content = f .read ()
92
93
93
- webtest .post (
94
- "/legacy/?:action=file_upload" ,
95
- headers = {"Authorization" : f"Basic { credentials } " },
96
- params = {
94
+ params = MultiDict (
95
+ {
97
96
"name" : "sampleproject" ,
98
97
"sha256_digest" : (
99
98
"117ed88e5db073bb92969a7545745fd977ee85b7019706dd256a64058f70963d"
100
99
),
101
100
"filetype" : "sdist" ,
102
101
"metadata_version" : "2.1" ,
103
102
"version" : "3.0.0" ,
104
- },
103
+ }
104
+ )
105
+ params .add ("project-url" , "https://example.com/foo" )
106
+ params .add ("project-url" , "https://example.com/bar" )
107
+
108
+ webtest .post (
109
+ "/legacy/?:action=file_upload" ,
110
+ headers = {"Authorization" : f"Basic { credentials } " },
111
+ params = params ,
105
112
upload_files = [("content" , "sampleproject-3.0.0.tar.gz" , content )],
106
113
status = HTTPStatus .OK ,
107
114
)
You can’t perform that action at this time.
0 commit comments