MCPcopy Create free account
hub / github.com/archlinux/archinstall / test_unexpected_response

Function test_unexpected_response

tests/test_share_log.py:119–127  ·  view source on GitHub ↗
(log_file: Path, paste_url: str, max_byte: int | None)

Source from the content-addressed store, hash-verified

117@given(paste_url=urls, max_byte=max_bytes)
118@settings(max_examples=3, suppress_health_check=[HealthCheck.function_scoped_fixture])
119def test_unexpected_response(log_file: Path, paste_url: str, max_byte: int | None) -> None:
120 log_file.write_text('some log content')
121 fake_response = BytesIO(b'ERROR: something went wrong')
122
123 with (
124 patch('archinstall.lib.log.logger._path', new=log_file.parent),
125 patch('urllib.request.urlopen', return_value=fake_response),
126 ):
127 assert share_install_log(paste_url, max_byte) is None

Callers

nothing calls this directly

Calls 1

share_install_logFunction · 0.90

Tested by

no test coverage detected