Exemplo n.º 1
0
    def test_should_enter_keystone_auth_if_not_healthcheck(self, proc_request):
        mocked_api = mock.Mock()
        instance = keystone_protocol.SkippingAuthProtocol(mocked_api, _CONF)
        request = mock.Mock()
        request.path = '/v2.0/logs/single'

        instance.process_request(request)

        self.assertTrue(proc_request.called)
Exemplo n.º 2
0
    def test_should_return_none_if_healthcheck(self):
        mocked_api = mock.Mock()
        instance = keystone_protocol.SkippingAuthProtocol(mocked_api, _CONF)
        request = mock.Mock()
        request.path = '/healthcheck'

        ret_val = instance.process_request(request)

        self.assertIsNone(ret_val)