(tmp_path, model, extra_headers=None, timeout=None)
| 394 | |
| 395 | @staticmethod |
| 396 | def _make_kb(tmp_path, model, extra_headers=None, timeout=None): |
| 397 | openkb_dir = tmp_path / ".openkb" |
| 398 | openkb_dir.mkdir() |
| 399 | config = {"model": model} |
| 400 | if extra_headers is not None: |
| 401 | config["extra_headers"] = extra_headers |
| 402 | if timeout is not None: |
| 403 | config["timeout"] = timeout |
| 404 | (openkb_dir / "config.yaml").write_text(yaml.safe_dump(config), encoding="utf-8") |
| 405 | return tmp_path |
| 406 | |
| 407 | @pytest.fixture(autouse=True) |
| 408 | def _clean_env(self, tmp_path, monkeypatch): |
no outgoing calls
no test coverage detected