def METHOD_NAME(self, check, result):
    check_name = check.__name__
    keyword = result.__name__
    pkg = RawCPV(check_name, f"ftp-{keyword}", "0")
    if check_name == "HomepageUrlCheck":
        deadurl = DeadUrl("HOMEPAGE", "ftp://pkgcheck.net/pkgcheck/", "dead ftp", pkg=pkg)
    else:
        deadurl = DeadUrl(
            "SRC_URI", "ftp://pkgcheck.net/pkgcheck/foo.tar.gz", "dead ftp", pkg=pkg
        )
    data = (
        (urllib.error.URLError("dead ftp"), deadurl),
        (socket.timeout("dead ftp"), deadurl),
        (None, None),  # faking a clean connection
    )
    args = ["-c", check_name, "-k", keyword, f"{check_name}/ftp-{keyword}"]
    for side_effect, expected_result in data:
        with patch("pkgcheck.checks.network.urllib.request.urlopen") as urlopen:
            if side_effect is not None:
                urlopen.side_effect = side_effect
            results = list(self.scan(self.scan_args + args))
            if side_effect is None:
                assert not results
            else:
                assert results == [expected_result]
                assert self._render_results(results), "failed rendering results"