def test_handle_no_plugins(self):
        # Setup
        auth_framework.REQUIRED_PLUGINS = []
        auth_framework.OPTIONAL_PLUGINS = []

        request = MockRequest()

        # Test
        http_code = auth_framework._handle(request)

        self.assertEqual(auth_framework.apache.OK, http_code)
    def test_handle_fail_no_optional(self):
        # Setup
        auth_framework.REQUIRED_PLUGINS = [fail]
        auth_framework.OPTIONAL_PLUGINS = []

        request = MockRequest()

        # Test
        http_code = auth_framework._handle(request)

        self.assertEqual(auth_framework.apache.HTTP_UNAUTHORIZED, http_code)