def test_xri(self): user_xri, services = discover.discoverXRI('=smoker') self.failUnless(services) self.failUnlessEqual(services[0].server_url, "http://www.myopenid.com/server") self.failUnlessEqual(services[1].server_url, "http://www.livejournal.com/openid/server.bml") self.failUnlessEqual(services[0].canonicalID, XRI("=!1000"))
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')
def test_xri(self): user_xri, services = discover.discoverXRI('=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/', ) 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/', )
def test_xri(self): user_xri, services = discover.discoverXRI('=smoker') self.assertTrue(services, "Expected services, got zero") self.assertEqual(services[0].server_url, "http://www.livejournal.com/openid/server.bml")
def test_xriNoCanonicalID(self): user_xri, services = discover.discoverXRI('=smoker*bad') self.assertFalse(services)
def test_xriNoCanonicalID(self): user_xri, services = discover.discoverXRI('=smoker*bad') self.failIf(services)