(log_file: Path, resp_url: str, paste_url: str, max_byte: int | None)
| 72 | @given(paste_url=urls, resp_url=urls, max_byte=max_bytes) |
| 73 | @settings(max_examples=3, suppress_health_check=[HealthCheck.function_scoped_fixture]) |
| 74 | def test_successful_upload(log_file: Path, resp_url: str, paste_url: str, max_byte: int | None) -> None: |
| 75 | log_file.write_text('some log content') |
| 76 | fake_response = BytesIO(resp_url.encode()) |
| 77 | |
| 78 | with ( |
| 79 | patch('archinstall.lib.log.logger._path', new=log_file.parent), |
| 80 | patch('urllib.request.urlopen', return_value=fake_response), |
| 81 | ): |
| 82 | result = share_install_log(paste_url, max_byte) |
| 83 | assert result == resp_url |
| 84 | |
| 85 | |
| 86 | @given(paste_url=urls, resp_url=urls, max_byte=max_bytes) |
nothing calls this directly
no test coverage detected