'Ensure that openid.fetchers.HTTPFetchingError is caught by
the association creation stuff.'

def test_error_exception_wrapped(self):

    self.fetcher = ExceptionRaisingMockFetcher()
    fetchers.setDefaultFetcher(self.fetcher)
    self.failUnlessRaises(fetchers.HTTPFetchingError, self.consumer._makeKVPost, Message.fromOpenIDArgs({'mode': 'associate'}), 'http://server_url')
    e = OpenIDServiceEndpoint()
    e.server_url = 'some://url'
    self.failUnless((self.consumer._getAssociation(e) is None))
    msg = Message.fromPostArgs({'openid.signed': ''})
    self.failIf(self.consumer._checkAuth(msg, 'some://url'))
