'Parse for OpenID services with a transformer function'

def testParseOpenID(self):

    services = self._getServices(simpleOpenIDTransformer)
    expectedServices = [('http://www.myopenid.com/server', 'http://josh.myopenid.com/'), ('http://www.schtuff.com/openid', 'http://users.schtuff.com/josh'), ('http://www.livejournal.com/openid/server.bml', 'http://www.livejournal.com/users/nedthealpaca/')]
    it = iter(services)
    for (server_url, delegate) in expectedServices:
        for (actual_url, actual_delegate) in it:
            self.failUnlessEqual(server_url, actual_url)
            self.failUnlessEqual(delegate, actual_delegate)
            break
        else:
            self.fail('Not    enough    services    found')
