2024-08-07 22:46:46 -04:00
|
|
|
from http import HTTPStatus
|
|
|
|
|
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
from kennel.main import app
|
|
|
|
from structlog.testing import capture_logs
|
|
|
|
|
|
|
|
client = TestClient(app)
|
|
|
|
|
|
|
|
|
|
|
|
def test_healthcheck():
|
|
|
|
response = client.get("/healthcheck")
|
|
|
|
assert response.status_code == HTTPStatus.OK
|
2024-08-08 00:10:01 -04:00
|
|
|
assert response.text == "hello"
|
2024-08-07 22:46:46 -04:00
|
|
|
|
2024-08-08 00:10:01 -04:00
|
|
|
def test_main():
|
|
|
|
response = client.get("/")
|
|
|
|
assert response.status_code == HTTPStatus.OK
|
|
|
|
assert response.text.startswith("<!DOCTYPE html>")
|