Some renaming
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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"}
|
||||
Reference in New Issue
Block a user