'Associate when the server has no allowed association types
Gives back an error with error_code and no fallback session or
assoc types.'

def test_associate2(self):

    self.server.negotiator.setAllowedTypes([])
    msg = Message.fromPostArgs({'openid.ns': OPENID2_NS, 'openid.session_type': 'no-encryption'})
    request = server.AssociateRequest.fromMessage(msg)
    response = self.server.openid_associate(request)
    self.failUnless(response.fields.hasKey(OPENID_NS, 'error'))
    self.failUnless(response.fields.hasKey(OPENID_NS, 'error_code'))
    self.failIf(response.fields.hasKey(OPENID_NS, 'assoc_handle'))
    self.failIf(response.fields.hasKey(OPENID_NS, 'assoc_type'))
    self.failIf(response.fields.hasKey(OPENID_NS, 'session_type'))
