personal memory agent
0

Configure Feed

Select the types of activity you want to include in your feed.

solstone / tests / test_google_sdk.py
1.4 kB 53 lines
1# SPDX-License-Identifier: AGPL-3.0-only 2# Copyright (c) 2026 sol pbc 3 4from __future__ import annotations 5 6import pytest 7 8from solstone.think.providers import PROVIDER_METADATA, build_provider_status 9 10 11def test_google_provider_metadata_has_no_runtime_adapter() -> None: 12 assert "cogitate_runtime" not in PROVIDER_METADATA["google"] 13 14 15@pytest.mark.parametrize( 16 ("api_key", "expected_status"), 17 [ 18 ( 19 "", 20 { 21 "provider": "google", 22 "configured": False, 23 "generate_ready": False, 24 "cogitate_ready": False, 25 "issues": ["GOOGLE_API_KEY not set"], 26 }, 27 ), 28 ( 29 "key", 30 { 31 "provider": "google", 32 "configured": True, 33 "generate_ready": True, 34 "cogitate_ready": True, 35 "issues": [], 36 }, 37 ), 38 ], 39) 40def test_google_provider_status_uses_managed_key_only( 41 monkeypatch, 42 api_key: str, 43 expected_status: dict[str, object], 44) -> None: 45 if api_key: 46 monkeypatch.setenv("GOOGLE_API_KEY", api_key) 47 else: 48 monkeypatch.delenv("GOOGLE_API_KEY", raising=False) 49 status = build_provider_status( 50 [{"name": "google", "env_key": "GOOGLE_API_KEY"}], 51 )["google"] 52 53 assert status == expected_status