(directory, path)
| 178 | [(str(res_path), "test.txt"), (res_path, pathlib.Path("test.txt"))], |
| 179 | ) |
| 180 | def test_from_directory(directory, path): |
| 181 | rv = send_from_directory(directory, path, environ) |
| 182 | rv.direct_passthrough = False |
| 183 | assert rv.data.strip() == b"FOUND" |
| 184 | rv.close() |
| 185 | |
| 186 | |
| 187 | @pytest.mark.parametrize("path", ["../res/test.txt", "nothing.txt", "null\x00.txt"]) |
nothing calls this directly
no test coverage detected