test: update quick start provider expectations
This commit is contained in:
@@ -1590,10 +1590,9 @@ def _get_quick_start_provider_info() -> dict[str, _QuickStartProviderInfo]:
|
|||||||
|
|
||||||
def _get_quick_start_provider_choices() -> dict[str, str]:
|
def _get_quick_start_provider_choices() -> dict[str, str]:
|
||||||
"""Return Quick Start provider display choices."""
|
"""Return Quick Start provider display choices."""
|
||||||
choices = {
|
choices: dict[str, str] = {}
|
||||||
info.display_name: provider_name
|
for provider_name, info in _get_quick_start_provider_info().items():
|
||||||
for provider_name, info in _get_quick_start_provider_info().items()
|
choices.setdefault(info.display_name, provider_name)
|
||||||
}
|
|
||||||
choices[_QUICK_START_CUSTOM_PROVIDER_CHOICE] = "custom"
|
choices[_QUICK_START_CUSTOM_PROVIDER_CHOICE] = "custom"
|
||||||
return choices
|
return choices
|
||||||
|
|
||||||
|
|||||||
@@ -975,15 +975,20 @@ class TestMainMenuUpdate:
|
|||||||
|
|
||||||
choices = onboard_wizard._get_quick_start_provider_choices()
|
choices = onboard_wizard._get_quick_start_provider_choices()
|
||||||
selected_provider_names = set(choices.values())
|
selected_provider_names = set(choices.values())
|
||||||
expected_provider_names = {
|
expected_provider_names = set()
|
||||||
spec.name
|
seen_display_names: set[str] = set()
|
||||||
for spec in PROVIDERS
|
for spec in PROVIDERS:
|
||||||
if spec.name != "custom" and not spec.is_oauth and not spec.is_transcription_only
|
if spec.name == "custom" or spec.is_oauth or spec.is_transcription_only:
|
||||||
}
|
continue
|
||||||
|
if spec.display_name in seen_display_names:
|
||||||
|
continue
|
||||||
|
seen_display_names.add(spec.display_name)
|
||||||
|
expected_provider_names.add(spec.name)
|
||||||
expected_provider_names.add("custom")
|
expected_provider_names.add("custom")
|
||||||
|
|
||||||
assert selected_provider_names == expected_provider_names
|
assert selected_provider_names == expected_provider_names
|
||||||
assert "assemblyai" not in selected_provider_names
|
assert "assemblyai" not in selected_provider_names
|
||||||
|
assert choices["OpenCode Zen"] == "opencode"
|
||||||
assert choices[onboard_wizard._QUICK_START_CUSTOM_PROVIDER_CHOICE] == "custom"
|
assert choices[onboard_wizard._QUICK_START_CUSTOM_PROVIDER_CHOICE] == "custom"
|
||||||
|
|
||||||
def test_quick_start_provider_choice_skips_advanced_prompts(self, monkeypatch):
|
def test_quick_start_provider_choice_skips_advanced_prompts(self, monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user