from __future__ import annotations import pytest from fastapi.testclient import TestClient from chat.app import app @pytest.fixture def client(tmp_path, monkeypatch): config_path = tmp_path / "config.toml" config_path.write_text('featherless_api_key = "test"\n') monkeypatch.setenv("CHAT_CONFIG_PATH", str(config_path)) monkeypatch.setenv("CHAT_DB_PATH", str(tmp_path / "test.db")) with TestClient(app) as c: yield c def test_get_new_bot_form_renders(client): response = client.get("/bots/new") assert response.status_code == 200 body = response.text.lower() assert "