Пример #1
0
 def test_useCanonicalID(self):
     """When there is no delegate, the CanonicalID should be used with XRI.
     """
     endpoint = discover.OpenIDServiceEndpoint()
     endpoint.claimed_id = XRI("=!1000")
     endpoint.canonicalID = XRI("=!1000")
     self.assertEqual(endpoint.getLocalID(), XRI("=!1000"))
Пример #2
0
    def test_xri_normalize(self):
        user_xri, services = discover.discoverXRI('xri://=smoker')

        self._checkService(services[0],
                           used_yadis=True,
                           types=['1.0'],
                           server_url="http://www.myopenid.com/server",
                           claimed_id=XRI("=!1000"),
                           canonical_id=XRI("=!1000"),
                           local_id='http://smoker.myopenid.com/',
                           display_identifier='=smoker')

        self._checkService(
            services[1],
            used_yadis=True,
            types=['1.0'],
            server_url="http://www.livejournal.com/openid/server.bml",
            claimed_id=XRI("=!1000"),
            canonical_id=XRI("=!1000"),
            local_id='http://frank.livejournal.com/',
            display_identifier='=smoker')