Some renaming

This commit is contained in:
2024-08-21 16:30:43 +02:00
parent 94ba832932
commit 3eaae13dc3
8 changed files with 38 additions and 16 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ EXPECTED_ENV_DICT: OrderedDict[str, str] = OrderedDict(
)
@pytest.fixture()
@pytest.fixture
def _prepare_test_dot_env() -> any:
TEST_DOT_ENV_PATH.touch(mode=0o600, exist_ok=True)
for key, value in EXPECTED_ENV_DICT.items():
@@ -27,7 +27,7 @@ def _prepare_test_dot_env() -> any:
TEST_DOT_ENV_PATH.unlink()
@pytest.fixture()
@pytest.fixture
def _load_test_dot_env(_prepare_test_dot_env: any) -> None:
Config.init(dotenv_path=TEST_DOT_ENV_PATH)
+11
View File
@@ -0,0 +1,11 @@
from fastapi import status
from fastapi.testclient import TestClient
from src.main import app
def test_get_homeassistant_status() -> None:
client = TestClient(app)
response = client.get("/homeassistant/status")
assert response.status_code == status.HTTP_200_OK
assert response.json() == {"Status": "Ok"}