Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content-gen/src/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def pytest_sessionfinish(session, exitstatus): # noqa: ARG001
if not loop.is_closed():
loop.close()
except Exception:
# Ignore exceptions during event loop cleanup (loop may already be closed)
pass


Expand Down
4 changes: 3 additions & 1 deletion content-gen/src/tests/services/test_blob_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ async def test_upload_product_image_png(mock_blob_service_with_containers):
"image/png"
)

assert ".png" in mock_blob_client.url or "image.png" in mock_blob_client.url
assert ".png" in url or "image.png" in url
assert description == "PNG image description"
mock_blob_client.upload_blob.assert_called_once()


@pytest.mark.asyncio
Expand Down
5 changes: 1 addition & 4 deletions content-gen/src/tests/services/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from unittest.mock import AsyncMock, MagicMock, patch

import pytest
import orchestrator as orch_module
from orchestrator import (_HARMFUL_PATTERNS_COMPILED,
_SYSTEM_PROMPT_PATTERNS_COMPILED,
PLANNING_INSTRUCTIONS, RAI_HARMFUL_CONTENT_RESPONSE,
Expand Down Expand Up @@ -838,8 +839,6 @@ def test_get_orchestrator_singleton():
mock_builder_instance.build.return_value = mock_workflow
mock_builder.return_value = mock_builder_instance

import orchestrator as orch_module

# Reset the singleton
orch_module._orchestrator = None

Expand Down Expand Up @@ -1517,8 +1516,6 @@ async def test_get_chat_client_foundry_mode():

def test_foundry_not_available():
"""Test when Foundry SDK is not available."""
import orchestrator as orch_module

# Check that FOUNDRY_AVAILABLE is defined
assert hasattr(orch_module, 'FOUNDRY_AVAILABLE')

Expand Down
3 changes: 0 additions & 3 deletions content-gen/tests/e2e-test/pages/HomePage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Home page object module for Fabric SQL automation tests."""
import logging
import json
import os
import re
import math
Expand All @@ -9,7 +8,6 @@

from PIL import Image
from base.base import BasePage
from config.constants import HELLO_PROMPT, GOOD_MORNING_PROMPT, RAI_PROMPT, OUT_OF_SCOPE_PROMPT

from playwright.sync_api import expect

Expand Down Expand Up @@ -48,7 +46,6 @@ class HomePage(BasePage):
MORE_OPTIONS = "(//button[@style='min-width: 24px; height: 24px; padding: 2px; color: var(--colorNeutralForeground3);'])[2]"
MORE_OPTIONS_DELETE = "(//button[@style='min-width: 24px; height: 24px; padding: 2px; color: var(--colorNeutralForeground3);'])[3]"
RENAME_OPTION = "//span[normalize-space()='Rename']"
RENAME_OPTION = "//span[normalize-space()='Rename']"
DELETE_CHAT = "//span[normalize-space()='Delete']"
DELETE_BUTTON = "//button[normalize-space()='Delete']"
RENAME_CONVERSATION_INPUT = "//input[@placeholder='Enter conversation name']"
Expand Down
11 changes: 0 additions & 11 deletions content-gen/tests/e2e-test/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,3 @@ def rename_duration_column():

# Register this function to run after everything is done
atexit.register(rename_duration_column)


# Add logs and docstring to report
# @pytest.hookimpl(hookwrapper=True)
# def pytest_runtest_makereport(item, call):
# outcome = yield
# report = outcome.get_result()
# report.description = str(item.function.__doc__)
# os.makedirs("logs", exist_ok=True)
# extra = getattr(report, "extra", [])
# report.extra = extra
Loading