def METHOD_NAME(self, Popen):
    proxy = ProxyCommand("hi")
    Popen.return_value.returncode = None
    assert proxy.closed is False
    assert proxy._closed is False
    Popen.return_value.returncode = 0
    assert proxy.closed is True
    assert proxy._closed is True