Skip to content

Meta Ads (Facebook/Instagram) MCP server for Claude, ChatGPT, Perplexity & Cursor — the Meta node of Pipeboard’s 5-platform family (+ Google, TikTok, Snap, Reddit). Hosted remote MCP, badged Meta Business Partner, free plan — no self-hosting required.

Refactor OpenAI test to handle missing dependency gracefully

Yves Junqueira770ceff963fc
diff --git a/tests/test_openai.py b/tests/test_openai.py
index 5a69437..2068c61 100644
--- a/tests/test_openai.py
+++ b/tests/test_openai.py
@@ -1,7 +1,9 @@
-from openai import OpenAI
import os
import pytest
+# Skip this test entirely if the optional 'openai' dependency is not installed
+openai = pytest.importorskip("openai", reason="openai package not installed")
+
@pytest.mark.skipif(
not os.getenv("PIPEBOARD_API_TOKEN"),
@@ -9,7 +11,7 @@ import pytest
)
def test_openai_mcp_integration():
"""Test OpenAI integration with Meta Ads MCP via Pipeboard."""
- client = OpenAI()
+ client = openai.OpenAI()
resp = client.responses.create(
model="gpt-4.1",