def METHOD_NAME(self, test_curl, test_open, test_path, test_exit):
    """
    Test fatal failure to write to dest after successful GET request.
    """
    instance = init_curl_instance(test_curl)
    instance.setopt.side_effect = test_opts
    test_open.side_effect = IOError
    test_path.return_value = None
    data = download.do_curl("foo", "testdest", is_fatal=True)
    test_exit.assert_called_once_with(1)