Skip to main content
Glama
pedrof
by pedrof
conftest.py1.11 kB
""" Pytest configuration and shared fixtures. """ import pytest from unittest.mock import Mock, AsyncMock @pytest.fixture def mock_hue_bridge(): """Create a mock HueBridgeV2 instance for testing.""" bridge = AsyncMock() bridge.initialize = AsyncMock() bridge.close = AsyncMock() # Mock lights bridge.lights = [] bridge.devices = Mock() bridge.groups = [] bridge.scenes = [] return bridge @pytest.fixture def sample_light_data(): """Sample light data for testing.""" return { "id": "light-123", "name": "Test Light", "on": True, "brightness": 127, "color_temp": 300, "reachable": True, } @pytest.fixture def sample_group_data(): """Sample group data for testing.""" return { "id": "group-456", "name": "Test Room", "type": "Room", "lights": ["light-123", "light-456"], } @pytest.fixture def sample_scene_data(): """Sample scene data for testing.""" return { "id": "scene-789", "name": "Test Scene", "group": "group-456", }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pedrof/hue-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server