'If there is not a running ssh-agent, ``ssh_agent_has_ssh_key`` returns
a deferred that fails with ``AgentNotFound``.'

def test_agent_not_found(self):

    try:
        old_agent_socket = os.environ['SSH_AUTH_SOCK']
        self.addCleanup(os.environ.__setitem__, 'SSH_AUTH_SOCK', old_agent_socket)
        del os.environ['SSH_AUTH_SOCK']
    except KeyError:
        pass
    key_file = FilePath(self.mktemp())
    key = generate_ssh_key(key_file)
    return self.assertFailure(ensure_agent_has_ssh_key(self.reactor, key), AgentNotFound)
