| from tower_game.ai import RemoteGateway | |
| class BrokenGateway(RemoteGateway): | |
| backend_name = "broken" | |
| def _generate(self, system: str, user: str) -> str: | |
| return "not json" | |
| def test_invalid_remote_output_uses_deterministic_fallback(): | |
| gateway = BrokenGateway({"timeout": 1}) | |
| result = gateway.opening(["q1_s", "q2_s", "q3_s", "q4_s", "q5_s"]) | |
| assert result.allocation.strength == 8 | |
| assert result.starting_skill_id == "power_strike" | |