Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayka committed Sep 3, 2024
1 parent 31f14ed commit e59ba95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/_server/test_file_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import os
import pathlib
import tempfile
from typing import Generator

Expand Down Expand Up @@ -154,7 +155,9 @@ def test_save_app_config_valid(app_file_manager: AppFileManager) -> None:


def test_save_app_config_exception(app_file_manager: AppFileManager) -> None:
app_file_manager.filename = "/invalid/path/app_config.py"
app_file_manager.filename = str(
pathlib.Path("/invalid/path/app_config.py")
)
with pytest.raises(HTTPException) as e: # noqa: PT012
app_file_manager.save_app_config({})
assert e.value.status_code == HTTPStatus.SERVER_ERROR
Expand Down

0 comments on commit e59ba95

Please sign in to comment.