We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baf546e commit 83e10bdCopy full SHA for 83e10bd
1 file changed
tests/test_dummy_live.py
@@ -1,12 +1,18 @@
1
# tests/test_dummy_live.py
2
+import os
3
import pytest
4
import requests
5
6
+BASE_URL = os.getenv("NEUROSERVE_URL", "http://127.0.0.1:8000")
7
+
8
9
@pytest.mark.integration
10
def test_dummy_ping_live():
- """Integration test: requires a running server on localhost:8000."""
- r = requests.post("http://127.0.0.1:8000/plugins/dummy/ping", json={"hello": "world"})
11
+ """Integration test: requires a running NeuroServe at BASE_URL."""
12
+ try:
13
+ r = requests.post(f"{BASE_URL}/plugins/dummy/ping", json={"hello": "world"}, timeout=2)
14
+ except requests.exceptions.ConnectionError:
15
+ pytest.skip(f"NeuroServe not running at {BASE_URL}")
16
assert r.status_code == 200
17
18
data = r.json()
0 commit comments