Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ def test_config_reports_configured_key(monkeypatch):
assert response.status_code == 200
assert response.json() == {"api_key_configured": True}
assert "test-value" not in response.text


def test_greet_accepts_max_length_name():
# Boundary test: the longest name the endpoint accepts.
long_name = "A" * 50
response = client.post("/greet", json={"name": long_name})
assert response.status_code == 200