Skip to content

Commit a190053

Browse files
committed
feat: Resolving pytest issues
1 parent 2cf411b commit a190053

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_frontend.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from unittest.mock import patch
2+
import app.frontend as frontend
3+
4+
5+
def test_frontend_renders(monkeypatch):
6+
# Mock the API call inside frontend
7+
with patch("src.app.frontend.requests.post") as mock_post:
8+
mock_post.return_value.json.return_value = {"predicted_success_score": 42.0}
9+
frontend.run() # or the main function that starts Streamlit
10+
# Assert code paths, or just that it runs without exceptions

0 commit comments

Comments
 (0)