Skip to content

Commit 83f85a4

Browse files
committed
Skipping tests when httpbin.org is not available.
1 parent 39f1981 commit 83f85a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_base_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def mock_c8y() -> CumulocityRestApi:
3737
@pytest.fixture(scope='module')
3838
def httpbin_basic() -> CumulocityRestApi:
3939
"""Provide mock CumulocityRestApi instance for httpbin with basic auth."""
40+
response = requests.head("https://httpbin.org/")
41+
if response.status_code != 200:
42+
pytest.skip(f"Skipped as httpbin.org is temporarily not available (HTTP {response.status_code})")
43+
4044
return CumulocityRestApi(
4145
base_url='https://httpbin.org',
4246
tenant_id='t12345',

0 commit comments

Comments
 (0)