MCPcopy Create free account
hub / github.com/RightNow-AI/rightnow-cli / test_initialization

Method test_initialization

tests/test_openrouter.py:94–102  ·  view source on GitHub ↗

Test client initialization.

(self, api_key)

Source from the content-addressed store, hash-verified

92 """Test the OpenRouterClient class."""
93
94 def test_initialization(self, api_key):
95 """Test client initialization."""
96 client = OpenRouterClient(api_key)
97
98 assert client.api_key == api_key
99 assert client.headers["Authorization"] == f"Bearer {api_key}"
100 assert client.headers["Content-Type"] == "application/json"
101 assert "HTTP-Referer" in client.headers
102 assert "X-Title" in client.headers
103
104 def test_make_request_success(self, openrouter_client, mock_requests_post, successful_api_response):
105 """Test successful API request."""

Callers

nothing calls this directly

Calls 1

OpenRouterClientClass · 0.90

Tested by

no test coverage detected