def test_prompt_to_choose_backend_api(monkeypatch: pytest.MonkeyPatch) -> None:
  """Choosing API-key backend returns (api_key, None, None)."""
  monkeypatch.setattr(click, "prompt", lambda *a, **k: "1")
  monkeypatch.setattr(
      cli_create, "_prompt_for_google_api_key", lambda _v: "api-key"
  )

  api_key, proj, region = cli_create._prompt_to_choose_backend(None, None, None)
  assert api_key == "api-key"
  assert proj is None and region is None
Choosing API-key backend returns (api_key, None, None).
tests/unittests/cli/utils/test_cli_create.py