File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2727
2828
2929# Mount static files dynamically to serve CSS, JS, and other static assets
30- static_dir = Path (__file__ ).parent / "static"
30+ static_dir = Path (__file__ ).parent . parent / "static"
3131app .mount ("/static" , StaticFiles (directory = static_dir ), name = "static" )
3232
3333
Original file line number Diff line number Diff line change 1111import pytest
1212from fastapi .testclient import TestClient
1313
14- from src .main import app
14+ from src .server . main import app
1515
1616BASE_DIR = Path (__file__ ).resolve ().parent .parent
1717TEMPLATE_DIR = BASE_DIR / "src" / "templates"
@@ -28,7 +28,8 @@ def test_client():
2828@pytest .fixture (scope = "module" , autouse = True )
2929def mock_static_files ():
3030 """Mock the static file mount to avoid directory errors."""
31- with patch ("src.main.StaticFiles" ) as mock_static :
31+ with patch ("src.server.main.StaticFiles" ) as mock_static :
32+ mock_static .return_value = None # Mocks the StaticFiles response
3233 yield mock_static
3334
3435
You can’t perform that action at this time.
0 commit comments