(self)
| 207 | @pytest.mark.filterwarnings("ignore::pytest.PytestUnraisableExceptionWarning") |
| 208 | class TestMultiPart: |
| 209 | def test_basic(self): |
| 210 | resources = join(dirname(__file__), "multipart") |
| 211 | client = Client(form_data_consumer) |
| 212 | |
| 213 | repository = [ |
| 214 | ( |
| 215 | "firefox3-2png1txt", |
| 216 | "---------------------------186454651713519341951581030105", |
| 217 | [ |
| 218 | ("anchor.png", "file1", "image/png", "file1.png"), |
| 219 | ("application_edit.png", "file2", "image/png", "file2.png"), |
| 220 | ], |
| 221 | "example text", |
| 222 | ), |
| 223 | ( |
| 224 | "firefox3-2pnglongtext", |
| 225 | "---------------------------14904044739787191031754711748", |
| 226 | [ |
| 227 | ("accept.png", "file1", "image/png", "file1.png"), |
| 228 | ("add.png", "file2", "image/png", "file2.png"), |
| 229 | ], |
| 230 | "--long text\r\n--with boundary\r\n--lookalikes--", |
| 231 | ), |
| 232 | ( |
| 233 | "opera8-2png1txt", |
| 234 | "----------zEO9jQKmLc2Cq88c23Dx19", |
| 235 | [ |
| 236 | ("arrow_branch.png", "file1", "image/png", "file1.png"), |
| 237 | ("award_star_bronze_1.png", "file2", "image/png", "file2.png"), |
| 238 | ], |
| 239 | "blafasel öäü", |
| 240 | ), |
| 241 | ( |
| 242 | "webkit3-2png1txt", |
| 243 | "----WebKitFormBoundaryjdSFhcARk8fyGNy6", |
| 244 | [ |
| 245 | ("gtk-apply.png", "file1", "image/png", "file1.png"), |
| 246 | ("gtk-no.png", "file2", "image/png", "file2.png"), |
| 247 | ], |
| 248 | "this is another text with ümläüts", |
| 249 | ), |
| 250 | ( |
| 251 | "ie6-2png1txt", |
| 252 | "---------------------------7d91b03a20128", |
| 253 | [ |
| 254 | ("file1.png", "file1", "image/x-png", "file1.png"), |
| 255 | ("file2.png", "file2", "image/x-png", "file2.png"), |
| 256 | ], |
| 257 | "ie6 sucks :-/", |
| 258 | ), |
| 259 | ] |
| 260 | |
| 261 | for name, boundary, files, text in repository: |
| 262 | folder = join(resources, name) |
| 263 | data = get_contents(join(folder, "request.http")) |
| 264 | for filename, field, content_type, fsname in files: |
| 265 | with client.post( |
| 266 | f"/?object={field}", |
nothing calls this directly
no test coverage detected