'Test the case where an unsupported-type response triggers a
retry to get an association with the new preferred type.'

def testUnsupportedWithRetry(self):

    msg = Message(self.endpoint.preferredNamespace())
    msg.setArg(OPENID_NS, 'error', 'Unsupported    type')
    msg.setArg(OPENID_NS, 'error_code', 'unsupported-type')
    msg.setArg(OPENID_NS, 'assoc_type', 'HMAC-SHA1')
    msg.setArg(OPENID_NS, 'session_type', 'DH-SHA1')
    assoc = association.Association('handle', 'secret', 'issued', 10000, 'HMAC-SHA1')
    self.consumer.return_messages = [msg, assoc]
    self.failUnless((self.consumer._negotiateAssociation(self.endpoint) is assoc))
    self.failUnlessLogMatches('Unsupported    association    type')
