-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
import pytest | ||
from fastapi import status | ||
from httpx import AsyncClient | ||
from inline_snapshot import snapshot | ||
|
||
|
||
@pytest.mark.anyio | ||
async def test_health_check(client: AsyncClient): | ||
response = await client.get("/health-check") | ||
assert response.status_code == status.HTTP_200_OK | ||
assert response.json()["version"] == "7.0.8" | ||
|
||
|
||
@pytest.mark.anyio | ||
async def test_health_check_snapshot(client: AsyncClient): | ||
response = await client.get("/health-check") | ||
assert response.status_code == status.HTTP_200_OK | ||
assert response.json() == snapshot({ | ||
"version": "7.0.8", | ||
"databases": ["admin", "config", "farmland", "local"], | ||
"collections": { | ||
"admin": ["system.users", "system.version"], | ||
"config": ["system.sessions"], | ||
"farmland": ["greens"], | ||
"local": ["startup_log"], | ||
}, | ||
}) | ||
|
||
|