Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

587 B
Raw Blame
from __future__ import annotations

from collections.abc import Iterator

import pytest

from switch_core.bridges.agent.operations.agent_management import (
    disable_agent_management,
)
from switch_core.gateway.cloud_controllers import set_cloud_enrollment


@pytest.fixture(autouse=True)
def _agent_management_operations_off_afterwards() -> Iterator[None]:
    """Installing management enables its agent operations process-wide, as it
    does in production; take them away again so no other test sees them."""
    yield
    disable_agent_management()
    set_cloud_enrollment(None)