Bridge Linux D-Bus IPC into MCP with tools for service discovery (list_services, introspect, list_objects), method calls and property access, plus convenience shortcuts for notifications, systemd units, and MPRIS media player control. All 25 tests passing.
20 lines
415 B
Python
20 lines
415 B
Python
"""Test fixtures for mcdbus."""
|
|
|
|
import pytest
|
|
|
|
from mcdbus._bus import BusManager
|
|
|
|
|
|
@pytest.fixture
|
|
async def bus_manager():
|
|
"""Provide a BusManager instance, cleaned up after test."""
|
|
mgr = BusManager()
|
|
yield mgr
|
|
await mgr.disconnect_all()
|
|
|
|
|
|
@pytest.fixture
|
|
async def session_bus(bus_manager: BusManager):
|
|
"""Provide a connected session bus."""
|
|
return await bus_manager.get_bus("session")
|