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