blob: 1c25f7f4289bf6ea053b83ccd2e6b70c8940d76e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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
assert response.text == "hello"
def test_main():
response = client.get("/")
assert response.status_code == HTTPStatus.OK
assert response.text.startswith("<!DOCTYPE html>")
|