(self)
| 243 | # getting closed. This causes PytestUnraisableExceptionWarning. |
| 244 | class TestMultiPart: |
| 245 | def test_basic(self): |
| 246 | resources = join(dirname(__file__), "multipart") |
| 247 | client = Client(form_data_consumer) |
| 248 | |
| 249 | repository = [ |
| 250 | ( |
| 251 | "firefox3-2png1txt", |
| 252 | "---------------------------186454651713519341951581030105", |
| 253 | [ |
| 254 | ("anchor.png", "file1", "image/png", "file1.png"), |
| 255 | ("application_edit.png", "file2", "image/png", "file2.png"), |
| 256 | ], |
| 257 | "example text", |
| 258 | ), |
| 259 | ( |
| 260 | "firefox3-2pnglongtext", |
| 261 | "---------------------------14904044739787191031754711748", |
| 262 | [ |
| 263 | ("accept.png", "file1", "image/png", "file1.png"), |
| 264 | ("add.png", "file2", "image/png", "file2.png"), |
| 265 | ], |
| 266 | "--long text\r\n--with boundary\r\n--lookalikes--", |
| 267 | ), |
| 268 | ( |
| 269 | "opera8-2png1txt", |
| 270 | "----------zEO9jQKmLc2Cq88c23Dx19", |
| 271 | [ |
| 272 | ("arrow_branch.png", "file1", "image/png", "file1.png"), |
| 273 | ("award_star_bronze_1.png", "file2", "image/png", "file2.png"), |
| 274 | ], |
| 275 | "blafasel öäü", |
| 276 | ), |
| 277 | ( |
| 278 | "webkit3-2png1txt", |
| 279 | "----WebKitFormBoundaryjdSFhcARk8fyGNy6", |
| 280 | [ |
| 281 | ("gtk-apply.png", "file1", "image/png", "file1.png"), |
| 282 | ("gtk-no.png", "file2", "image/png", "file2.png"), |
| 283 | ], |
| 284 | "this is another text with ümläüts", |
| 285 | ), |
| 286 | ( |
| 287 | "ie6-2png1txt", |
| 288 | "---------------------------7d91b03a20128", |
| 289 | [ |
| 290 | ("file1.png", "file1", "image/x-png", "file1.png"), |
| 291 | ("file2.png", "file2", "image/x-png", "file2.png"), |
| 292 | ], |
| 293 | "ie6 sucks :-/", |
| 294 | ), |
| 295 | ] |
| 296 | |
| 297 | for name, boundary, files, text in repository: |
| 298 | folder = join(resources, name) |
| 299 | data = get_contents(join(folder, "request.http")) |
| 300 | for filename, field, content_type, fsname in files: |
| 301 | with client.post( |
| 302 | f"/?object={field}", |
nothing calls this directly
no test coverage detected