Skip to content

Commit 83e10bd

Browse files
committed
a33301
1 parent baf546e commit 83e10bd

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/test_dummy_live.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# tests/test_dummy_live.py
2+
import os
23
import pytest
34
import requests
45

6+
BASE_URL = os.getenv("NEUROSERVE_URL", "http://127.0.0.1:8000")
7+
58

69
@pytest.mark.integration
710
def test_dummy_ping_live():
8-
"""Integration test: requires a running server on localhost:8000."""
9-
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}")
1016
assert r.status_code == 200
1117

1218
data = r.json()

0 commit comments

Comments
 (0)