test fix: MicrosoftSSOHandler

This commit is contained in:
Ishaan Jaffer 2025-10-11 08:55:23 -07:00
parent 3aa0f6ed72
commit a163bf9f51

View file

@ -2,7 +2,6 @@ import asyncio
import json
import os
import sys
from litellm._uuid import uuid
from typing import Optional, cast
from unittest.mock import AsyncMock, MagicMock, patch
@ -10,6 +9,8 @@ import pytest
from fastapi import Request
from fastapi.testclient import TestClient
from litellm._uuid import uuid
sys.path.insert(
0, os.path.abspath("../../../")
) # Adds the parent directory to the system path
@ -46,7 +47,7 @@ def test_microsoft_sso_handler_openid_from_response_user_principal_name():
# Act
# Call the method being tested
result = MicrosoftSSOHandler.openid_from_response(
response=mock_response, team_ids=expected_team_ids
response=mock_response, team_ids=expected_team_ids, user_role=None
)
# Assert
@ -77,7 +78,7 @@ def test_microsoft_sso_handler_openid_from_response():
# Act
# Call the method being tested
result = MicrosoftSSOHandler.openid_from_response(
response=mock_response, team_ids=expected_team_ids
response=mock_response, team_ids=expected_team_ids, user_role=None
)
# Assert
@ -98,7 +99,7 @@ def test_microsoft_sso_handler_with_empty_response():
# Test with None response
# Act
result = MicrosoftSSOHandler.openid_from_response(response=None, team_ids=[])
result = MicrosoftSSOHandler.openid_from_response(response=None, team_ids=[], user_role=None)
# Assert
assert isinstance(result, CustomOpenID)