Skip to content

Commit 5ad1109

Browse files
authored
Merge pull request #56 from MannLabs/fix_test
fix a test
2 parents 8ae8965 + 131caf8 commit 5ad1109

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

webapp/tests/pages_/test_overview.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@
55
from unittest.mock import MagicMock, patch
66

77
import pandas as pd
8-
from streamlit.testing.v1 import AppTest
8+
9+
import shared.yamlsettings
10+
11+
12+
def mock_get_path(path_key: str) -> Path:
13+
"""Mock get_path to return dummy paths for testing."""
14+
del path_key # Unused parameter
15+
return Path("/some/path")
16+
17+
18+
shared.yamlsettings.get_path = mock_get_path # type: ignore[invalid-assignment]
19+
20+
from streamlit.testing.v1 import AppTest # noqa: E402]
921

1022
PAGES_FOLDER = Path(__file__).parent / Path("../../pages_")
1123

0 commit comments

Comments
 (0)