Spaces:
Running
Running
Download tests/cli/test_agy_session_settings.py from dherain24/claude-proxy: direct link, hf CLI and curl.
- Browser
- Download file 2.07 kB
-
https://huggingface.co/spaces/dherain24/claude-proxy/resolve/main/tests/cli/test_agy_session_settings.py
- Command line
-
hf download hf://spaces/dherain24/claude-proxy/tests/cli/test_agy_session_settings.py
-
curl -L -o test_agy_session_settings.py https://huggingface.co/spaces/dherain24/claude-proxy/resolve/main/tests/cli/test_agy_session_settings.py
2.07 kB
| """FCC configures Antigravity for the child session without a saved connection.""" | |
| import json | |
| from pathlib import Path | |
| import pytest | |
| from free_claude_code.harnesses import antigravity | |
| from tests.cli.test_launcher_workflow import launch | |
| def test_fresh_launch_uses_temporary_settings(launch_capture): | |
| path = antigravity.config_path() | |
| path.parent.mkdir(parents=True) | |
| path.write_text('{"modelProvider":"", "model":"personal"}') | |
| before = path.read_bytes() | |
| launch_capture.versions["agy"] = "1.5.9" | |
| files = [] | |
| def inspect(command, env): | |
| path = Path(command[command.index("--settings") + 1]) | |
| files.append(path) | |
| settings = json.loads(path.read_text()) | |
| assert settings["modelProvider"] == "gemini" | |
| model = launch_capture.catalog["default_model_id"] | |
| assert settings["customModelsConfig"]["customModels"][model]["modelName"] == ( | |
| "gemini-api://models/" + model | |
| ) | |
| assert env["GEMINI_API_KEY"] not in path.read_text() | |
| assert antigravity.config_path().read_bytes() == before | |
| assert not antigravity.state_path().exists() | |
| launch_capture.on_start = inspect | |
| launch("agy", ["--print", "hello"]) | |
| assert files and all(not path.exists() for path in files) | |
| def test_user_arguments_follow_fcc_defaults_without_interpretation( | |
| args, launch_capture | |
| ): | |
| launch("agy", args) | |
| command = launch_capture.commands[0] | |
| assert command[:2] == ["agy", "--settings"] | |
| assert command[3:5] == ["--model", launch_capture.catalog["default_model_id"]] | |
| assert command[5:] == args | |