()
| 423 | |
| 424 | |
| 425 | def test_file_closing(): |
| 426 | closed = [] |
| 427 | |
| 428 | class SpecialInput: |
| 429 | def read(self, size): |
| 430 | return b"" |
| 431 | |
| 432 | def close(self): |
| 433 | closed.append(self) |
| 434 | |
| 435 | create_environ(data={"foo": SpecialInput()}) |
| 436 | assert len(closed) == 1 |
| 437 | builder = EnvironBuilder() |
| 438 | builder.files.add_file("blah", SpecialInput()) |
| 439 | builder.close() |
| 440 | assert len(closed) == 2 |
| 441 | |
| 442 | |
| 443 | def test_follow_redirect(): |
nothing calls this directly
no test coverage detected