Spaces:
Running
Running
File size: 1,251 Bytes
b16e7a5 e0c585c b16e7a5 4b245e3 b16e7a5 4b245e3 b16e7a5 e0c585c 4b245e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import gradio as gr
from src.app import create_demo
def test_examples_include_advanced_mode():
"""Verify that one example entry uses 'advanced' mode."""
demo, _ = create_demo()
assert any(example[1] == "advanced" for example in demo.examples), (
"Expected at least one example to be 'advanced' mode"
)
def test_accordion_label_updated():
"""Verify the accordion label reflects the new, concise text."""
_, accordion = create_demo()
assert accordion.label == "βοΈ Mode & API Key (Free tier works!)", (
"Accordion label not updated to 'βοΈ Mode & API Key (Free tier works!)'"
)
def test_orchestrator_mode_info_text_updated():
"""Verify the Orchestrator Mode info text contains the new emojis and phrasing."""
demo, _ = create_demo()
# Assuming additional_inputs is a list and the Radio is the first element
orchestrator_radio = demo.additional_inputs[0]
expected_info = "β‘ Simple: Free/Any | π¬ Advanced: OpenAI (Deep Research)"
assert isinstance(orchestrator_radio, gr.Radio), (
"Expected first additional input to be gr.Radio"
)
assert orchestrator_radio.info == expected_info, (
"Orchestrator Mode info text not updated correctly"
)
|