Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

564 B
Raw Blame
from django.test import SimpleTestCase

from posthog.schema import AssistantTool


class TestToolRegistry(SimpleTestCase):
    def test_can_get_registered_contextual_tool_class(self):
        from ee.hogai.registry import get_contextual_tool_class

        self.assertIsNotNone(get_contextual_tool_class(AssistantTool.CREATE_FEATURE_FLAG))

    def test_can_get_registered_contextual_tool_class_with_invalid_tool_name(self):
        from ee.hogai.registry import get_contextual_tool_class

        self.assertIsNone(get_contextual_tool_class("invalid_tool_name"))