def METHOD_NAME(monkeypatch):
    called = [None]
    @contextmanager
    def success(*args, **kwargs):
        called[0] = args
        yield None
    monkeypatch.setattr(socket, "create_connection", success)
    pbench.common.wait_for_uri("http://localhost:42", 142)
    first_arg = called[0][0]
    assert first_arg[0] == "localhost" and first_arg[1] == 42, f"{called[0]!r}"