Remove or update variable fields from `scan_result`such as version and errors to ensure that the test data is stable. If `remove_file_date` is True, the file.date attribute is removed.
(scan_result, remove_file_date=False)
| 384 | |
| 385 | |
| 386 | def streamline_jsonlines_scan(scan_result, remove_file_date=False): |
| 387 | """ |
| 388 | Remove or update variable fields from `scan_result`such as version and |
| 389 | errors to ensure that the test data is stable. |
| 390 | |
| 391 | If `remove_file_date` is True, the file.date attribute is removed. |
| 392 | """ |
| 393 | for result_line in scan_result: |
| 394 | headers = result_line.get('headers', {}) |
| 395 | if headers: |
| 396 | streamline_headers(headers) |
| 397 | |
| 398 | for scanned_file in result_line.get('files', []): |
| 399 | streamline_scanned_file(scanned_file, remove_file_date) |
| 400 | |
| 401 | |
| 402 | def check_json(expected, results, regen=REGEN_TEST_FIXTURES): |
no test coverage detected