Skip to content

Commit dca843f

Browse files
committed
Fix: Skip Guest Issuer tests if environment variables are missing
1 parent a3e206e commit dca843f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/api/test_guest_issuer.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import os
2626
import time
27+
import pytest
2728

2829
import webexteamssdk
2930

@@ -34,14 +35,11 @@
3435
"WEBEX_TEAMS_GUEST_ISSUER_SECRET"
3536
)
3637

37-
if not WEBEX_TEAMS_GUEST_ISSUER_ID:
38-
raise ValueError(
39-
"The WEBEX_TEAMS_GUEST_ISSUER_ID environment variable must be set."
40-
)
41-
42-
if not WEBEX_TEAMS_GUEST_ISSUER_SECRET:
43-
raise ValueError(
44-
"The WEBEX_TEAMS_GUEST_ISSUER_SECRET environment variable must be set."
38+
if WEBEX_TEAMS_GUEST_ISSUER_ID is None or not WEBEX_TEAMS_GUEST_ISSUER_SECRET:
39+
pytest.skip(
40+
"Required WEBEX_TEAMS_GUEST_ISSUER_ID and/or "
41+
"WEBEX_TEAMS_GUEST_ISSUER_SECRET environment variables are not set.",
42+
allow_module_level=True,
4543
)
4644

4745

0 commit comments

Comments
 (0)