Пример #1
0
 def test_load_service(self):
     json = """{
         "authentication": {
             "providers": [{
                 "issuer": "auth-issuer"
             }]
         }
     }"""
     service = _read_service_from_json(json)
     self.assertIsNotNone(wsgi._create_authenticator(service))
Пример #2
0
 def test_load_service(self):
     json = """{
         "authentication": {
             "providers": [{
                 "issuer": "auth-issuer"
             }]
         }
     }"""
     service = _read_service_from_json(json)
     self.assertIsNotNone(wsgi._create_authenticator(service))
Пример #3
0
 def test_load_service_without_auth(self):
     service = _read_service_from_json("{}")
     self.assertIsNone(wsgi._create_authenticator(service))
Пример #4
0
 def test_create_without_service(self):
     with self.assertRaises(ValueError):
         wsgi._create_authenticator(None)
Пример #5
0
 def test_load_service_without_auth(self):
     service = _read_service_from_json("{}")
     self.assertIsNone(wsgi._create_authenticator(service))
Пример #6
0
 def test_create_without_service(self):
     with self.assertRaises(ValueError):
         wsgi._create_authenticator(None)