diff options
| author | Elizabeth Hunt <elizabeth@simponic.xyz> | 2024-08-07 21:10:01 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth@simponic.xyz> | 2024-08-07 21:10:01 -0700 |
| commit | 9cdb7a145e5bc0167243e4fac0cad0b65533f97b (patch) | |
| tree | 39cc21aa6b50cd7fe1e0792a706463f8b964b59b /tests | |
| parent | 514b0338844334aa4aaf332c6e29efb6a1aadaa6 (diff) | |
| download | kennel.hatecomputers.club-9cdb7a145e5bc0167243e4fac0cad0b65533f97b.tar.gz kennel.hatecomputers.club-9cdb7a145e5bc0167243e4fac0cad0b65533f97b.zip | |
add ci/cd
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_main.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/test_main.py b/tests/test_main.py index cbab286..1c25f7f 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -10,13 +10,9 @@ client = TestClient(app) def test_healthcheck(): response = client.get("/healthcheck") assert response.status_code == HTTPStatus.OK - assert response.text == "" + assert response.text == "hello" - -def test_read_main(): - # Example of testing logging using a context manager - with capture_logs() as cap_logs: - response = client.get("/") - assert {"event": "In root path", "log_level": "info"} in cap_logs - assert response.status_code == HTTPStatus.OK - assert response.json() == {"msg": "Hello World"} +def test_main(): + response = client.get("/") + assert response.status_code == HTTPStatus.OK + assert response.text.startswith("<!DOCTYPE html>") |
