Skip to content

Commit

Permalink
✅ Full test coverage for main, while I'm here
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Dec 10, 2024
1 parent 6c6b856 commit 10fd6a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions endorser/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import pytest
from fastapi import FastAPI, HTTPException
from fastapi.testclient import TestClient

from endorser.main import app, app_lifespan, health_check, health_ready
from endorser.services.endorsement_processor import EndorsementProcessor
Expand Down Expand Up @@ -152,3 +153,10 @@ async def test_health_ready_with_timeout():
"status": "not ready",
"error": "JetStream health check timed out",
}


def test_scalar_html():
client = TestClient(app)
# Simulate a request to the /docs endpoint
response = client.get("/docs")
assert response.status_code == 200

0 comments on commit 10fd6a3

Please sign in to comment.