def METHOD_NAME(mock_sleep: mock.MagicMock) -> None:
    def retry_on(response: requests.Response, exception: BaseException) -> bool:
        return response.text == 'error'
    session = Client(retry_condition=retry_on).session
    url = 'https://example.com/data'
    with requests_mock.mock(session=session) as m:
        m.get(url, text='error')
        response = session.get(url)
        assert response.content == b"error"
    assert m.call_count == RunConfiguration.request_max_attempts