Skip to content

Commit bb0e8ce

Browse files
fix: update test input values and error messages for clarity; refine Azure identity import handling
1 parent 1ffd109 commit bb0e8ce

5 files changed

Lines changed: 18 additions & 7 deletions

File tree

archive-doc-gen/src/frontend/src/components/ChatHistory/chatHistoryListItem.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,12 @@ describe('ChatHistoryListItemCell', () => {
569569
})
570570

571571
const inputItem = screen.getByPlaceholderText(conversation.title)
572-
fireEvent.change(inputItem, { target: { value: 'Test Chat' } })
572+
fireEvent.change(inputItem, { target: { value: 'Another Existing Chat' } })
573573

574574
fireEvent.keyDown(inputItem, { key: 'Enter', code: 'Enter', charCode: 13 })
575575

576576
await waitFor(() => {
577-
expect(screen.getByText(/Error: Enter a new title to proceed./i)).toBeInTheDocument()
577+
expect(screen.getByText(/Error: could not rename item/i)).toBeInTheDocument()
578578
})
579579
})
580580

content-gen/scripts/post_deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import sys
4141
from dataclasses import dataclass
4242
from pathlib import Path
43-
from typing import List, Dict, Any
43+
from typing import Dict
4444

4545
try:
4646
import httpx

content-gen/src/backend/orchestrator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,10 @@ async def generate_content(
15141514
except Exception as parse_error:
15151515
# Best-effort JSON extraction from markdown code block; on failure,
15161516
# fall back to the original prompt_text without interrupting image generation.
1517-
logger.debug(f"Failed to parse JSON from markdown code block for image prompt: {parse_error}")
1517+
logger.debug(
1518+
"Failed to parse JSON from markdown code block for image prompt: %s",
1519+
parse_error,
1520+
)
15181521

15191522
# Build product description for DALL-E context
15201523
# Include detailed image descriptions if available for better color accuracy

content-gen/tests/rai_testing.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,16 @@
4040
try:
4141
from azure.identity import AzureCliCredential, InteractiveBrowserCredential
4242
except ImportError:
43-
# Azure Identity is optional; authentication features depending on it will be unavailable.
44-
pass
43+
# Azure Identity is optional; provide stubs that fail clearly if Azure auth is requested.
44+
class _MissingAzureIdentityCredential:
45+
def __init__(self, *args, **kwargs) -> None:
46+
raise RuntimeError(
47+
"The 'azure-identity' package is required to use '--use-azure-auth'. "
48+
"Install it with 'pip install azure-identity' and try again."
49+
)
50+
51+
AzureCliCredential = _MissingAzureIdentityCredential
52+
InteractiveBrowserCredential = _MissingAzureIdentityCredential
4553

4654

4755
class TestCategory(Enum):

docs/generate_architecture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from diagrams.azure.compute import ContainerInstances, AppServices, ContainerRegistries
1616
from diagrams.azure.database import CosmosDb, BlobStorage
1717
from diagrams.azure.ml import CognitiveServices
18-
from diagrams.azure.network import PrivateEndpoint, DNSZones
18+
from diagrams.azure.network import PrivateEndpoint
1919
from diagrams.azure.analytics import AnalysisServices
2020
from diagrams.onprem.client import User
2121

0 commit comments

Comments
 (0)