Skip to content

Commit 8930f09

Browse files
authored
Update test_full.py
1 parent d43f6cb commit 8930f09

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test_full.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55

66
@pytest.fixture(autouse=True)
77
def setup_api_key():
8-
loopypy.setApiKey("dummy_key")
8+
with patch("src.app.requests.get") as mock_get:
9+
mock_resp = MagicMock()
10+
mock_resp.json.return_value = {
11+
"exists": True,
12+
"success": True
13+
}
14+
mock_resp.raise_for_status = lambda: None
15+
mock_get.return_value = mock_resp
16+
loopypy.setApiKey("dummy_key")
917

1018
def test_check_status_ok():
1119
with patch("src.app.requests.get") as mock_get:

0 commit comments

Comments
 (0)