diff --git a/tests/unit/test_okta.py b/tests/unit/test_okta.py index 388daad0..ef2cac38 100644 --- a/tests/unit/test_okta.py +++ b/tests/unit/test_okta.py @@ -561,12 +561,10 @@ def test_local_auth(mocker): from tokendito.http_client import HTTP_client # Create a fake HTTP response using Mock - mock_response = Mock() - mock_response.raise_for_status = Mock() - mock_response.json = Mock(return_value={"status": "SUCCESS", "sessionToken": "pytesttoken"}) + mock_response_data = {"status": "SUCCESS", "sessionToken": "pytesttoken"} # Patch HTTP_client.post to return the mock response - mocker.patch.object(HTTP_client, "post", return_value=mock_response) + mocker.patch.object(HTTP_client, "post", return_value=mock_response_data) # Initialize the configuration pytest_config = Config(