'Look for user_setup_url in checkid_immediate negative
response in OpenID 1 case.'

def test_answerImmediateDenyOpenID1(self):

    self.request.message = Message(OPENID1_NS)
    self.request.mode = 'checkid_immediate'
    self.request.immediate = True
    server_url = 'http://setup-url.unittest/'
    answer = self.request.answer(False, server_url=server_url)
    self.failUnlessEqual(answer.request, self.request)
    self.failUnlessEqual(len(answer.fields.toPostArgs()), 2, answer.fields)
    self.failUnlessEqual(answer.fields.getOpenIDNamespace(), OPENID1_NS)
    self.failUnless(answer.fields.namespaces.isImplicit(OPENID1_NS))
    self.failUnlessEqual(answer.fields.getArg(OPENID_NS, 'mode'), 'id_res')
    self.failUnless(answer.fields.getArg(OPENID_NS, 'user_setup_url', '').startswith(server_url))
