fix exception when file does not exist
fixes https://git.clan.lol/clan/clan-core/issues/488
This commit is contained in:
10
pkgs/clan-cli/tests/test_static_files.py
Normal file
10
pkgs/clan-cli/tests/test_static_files.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import pytest
|
||||
from api import TestClient
|
||||
|
||||
|
||||
@pytest.mark.impure
|
||||
def test_static_files(api: TestClient) -> None:
|
||||
response = api.get("/")
|
||||
assert response.headers["content-type"] == "text/html; charset=utf-8"
|
||||
response = api.get("/does-no-exists.txt")
|
||||
assert response.status_code == 404
|
||||
Reference in New Issue
Block a user