def test06_full_set(self):
     info = IIIFInfo(identifier="http://example.com/i1", api_version='2.1')
     auth = IIIFAuth()
     auth.name = "Whizzo!"
     auth.logout_uri = 'http://example.com/logout'
     auth.access_token_uri = 'http://example.com/token'
     auth.client_id_uri = 'http://example.com/clientId'
     auth.login_uri = 'http://example.com/login'
     auth.add_services(info) 
     self.assertEqual( info.service['@id'], "http://example.com/login" )
     self.assertEqual( info.service['label'], "Login to Whizzo!" )
     svcs = info.service['service']
     self.assertEqual( svcs[0]['@id'], "http://example.com/logout" )
     self.assertEqual( svcs[1]['@id'], "http://example.com/clientId" )
     self.assertEqual( svcs[2]['@id'], "http://example.com/token" )
Exemple #2
0
 def test06_full_set(self):
     """Test full set of auth services."""
     info = IIIFInfo(identifier="http://example.com/i1", api_version='2.1')
     auth = IIIFAuth()
     auth.name = "Whizzo!"
     auth.logout_uri = 'http://example.com/logout'
     auth.access_token_uri = 'http://example.com/token'
     auth.client_id_uri = 'http://example.com/clientId'
     auth.login_uri = 'http://example.com/login'
     auth.add_services(info)
     self.assertEqual(info.service['@id'], "http://example.com/login")
     self.assertEqual(info.service['label'], "Login to Whizzo!")
     svcs = info.service['service']
     self.assertEqual(svcs[0]['@id'], "http://example.com/logout")
     self.assertEqual(svcs[1]['@id'], "http://example.com/clientId")
     self.assertEqual(svcs[2]['@id'], "http://example.com/token")