style: fix code formatting with black, isort, and flake8

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-12 03:21:41 +00:00
parent f79bd2cb0c
commit ff9a3ff49f
87 changed files with 874 additions and 729 deletions
+5 -10
View File
@@ -4,8 +4,9 @@ Tests for app/utils/oauth_helper.py
Tests OAuth token exchange helper functions.
"""
import pytest
from unittest.mock import Mock, patch
import pytest
import requests
from fastapi import HTTPException
@@ -51,9 +52,7 @@ class TestOAuthTokenExchange:
assert result["expires_in"] == 3600
# Verify request was made correctly
mock_post.assert_called_once_with(
"https://oauth.example.com/token", data=payload, timeout=30
)
mock_post.assert_called_once_with("https://oauth.example.com/token", data=payload, timeout=30)
@patch("app.utils.oauth_helper.requests.post")
@patch("app.utils.oauth_helper.settings")
@@ -81,9 +80,7 @@ class TestOAuthTokenExchange:
)
# Verify custom timeout was used
mock_post.assert_called_once_with(
"https://oauth.example.com/token", data=payload, timeout=60
)
mock_post.assert_called_once_with("https://oauth.example.com/token", data=payload, timeout=60)
@patch("app.utils.oauth_helper.requests.post")
@patch("app.utils.oauth_helper.settings")
@@ -200,9 +197,7 @@ class TestOAuthTokenExchange:
# Mock error response with invalid JSON
mock_response = Mock()
mock_response.status_code = 400
mock_response.json.side_effect = requests.exceptions.JSONDecodeError(
"Invalid JSON", "", 0
)
mock_response.json.side_effect = requests.exceptions.JSONDecodeError("Invalid JSON", "", 0)
mock_post.return_value = mock_response
payload = {"grant_type": "authorization_code"}