def test_generate_files_with_api_key(agent_folder: Path) -> None:
  """Files should be created with the API-key backend and correct .env flags."""
  cli_create._generate_files(
      str(agent_folder),
      google_api_key="dummy-key",
      model="gemini-2.0-flash-001",
  )

  env_content = (agent_folder / ".env").read_text()
  assert "GOOGLE_API_KEY=dummy-key" in env_content
  assert "GOOGLE_GENAI_USE_VERTEXAI=0" in env_content
  assert (agent_folder / "agent.py").exists()
  assert (agent_folder / "__init__.py").exists()
Files should be created with the API-key backend and correct .env flags.
tests/unittests/cli/utils/test_cli_create.py