Modify the `errors` list in place to make it easier to test
(errors)
| 301 | |
| 302 | |
| 303 | def streamline_errors(errors): |
| 304 | """ |
| 305 | Modify the `errors` list in place to make it easier to test |
| 306 | """ |
| 307 | for i, error in enumerate(errors[:]): |
| 308 | error_lines = error.splitlines(True) |
| 309 | if len(error_lines) <= 1: |
| 310 | continue |
| 311 | # keep only first and last line |
| 312 | cleaned_error = ''.join([error_lines[0] + error_lines[-1]]) |
| 313 | errors[i] = cleaned_error |
| 314 | |
| 315 | |
| 316 | def streamline_headers(headers): |
no test coverage detected