from fastapi.testclient import TestClient from monday_com_orca_backend.api.main import app class TestHello: endpoint = "/hello" def test_hello_ok(self): """Test the /hello endpoint to ensure it returns a 200 OK status with a valid response, WITHOUT requiring authentication. """ client = TestClient(app) response = client.get(self.endpoint) status_code = response.status_code if status_code == 404: # The endpoint is not found, which is expected if the endpoint is not # implemented or is protected and returns a 404 for unauthorized requests, # to hide it from potential attackers. raise AssertionError("Is the endpoint missing or protected?") else: data = response.json() assert data["status"] == "ok", "Expected health check to return 'ok' status"