'Make sure that the handle is invalidated when is_valid is false
From "Verifying directly with the OpenID Provider"::
If the OP responds with "is_valid" set to "true", and
"invalidate_handle" is present, the Relying Party SHOULD
NOT send further authentication requests with that handle.'

def test_badResponseInvalidate(self):

    self._createAssoc()
    response = Message.fromOpenIDArgs({'is_valid': 'false', 'invalidate_handle': 'handle'})
    r = self.consumer._processCheckAuthResponse(response, self.server_url)
    self.failIf(r)
    self.failUnless((self.consumer.store.getAssociation(self.server_url) is None))
