forked from meraki/dashboard-api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
30 lines (20 loc) · 782 Bytes
/
Copy pathconftest.py
File metadata and controls
30 lines (20 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Root test configuration: shared fixtures for all test modules."""
import pytest
from tests.unit.conftest import FAKE_API_KEY, make_metadata, make_mock_response
@pytest.fixture
def mock_response_factory():
"""Factory for creating mock httpx.Response objects."""
return make_mock_response
@pytest.fixture
def fake_api_key():
return FAKE_API_KEY
@pytest.fixture(autouse=True)
def _clean_env(monkeypatch):
"""Remove Meraki env vars so tests don't leak state."""
monkeypatch.delenv("MERAKI_DASHBOARD_API_KEY", raising=False)
monkeypatch.delenv("BE_GEO_ID", raising=False)
monkeypatch.delenv("MERAKI_PYTHON_SDK_CALLER", raising=False)
@pytest.fixture
def metadata_factory():
"""Factory for endpoint metadata dicts."""
return make_metadata