def create_test_finding(title: str, severity: FindingSeverity = FindingSeverity.INFO) -> Finding:
    """Create a test finding with the given title and severity"""
    # Add mention to title if SLACK_MENTION is set
    if SLACK_MENTION:
        title = f"<@{SLACK_MENTION}> {title}"

    # Create a subject first with the correct type
    subject = FindingSubject(
        name="test-pod",
        namespace="default",
        subject_type=FindingSubjectType.TYPE_POD,
        labels={
            "app": "test-app",
            "environment": "test"
        },
        annotations={
            "description": "Test annotation"
        }
    )

    finding = Finding(
        title=title,
        source=FindingSource.PROMETHEUS,
        severity=severity,
        aggregation_key=f"test-{title}",
        finding_type=FindingType.ISSUE,
        description="This is a test finding for Slack message formatting",
        subject=subject
    )

    # We need to mock the service since TopServiceResolver won't work in test environment
    # Create a simple mock for the service object
    class MockService:
        def __init__(self, name, namespace, resource_type):
            self.name = name
            self.namespace = namespace
            self.resource_type = resource_type

        def get_resource_key(self):
            return f"{self.namespace}/{self.name}"

    # Set the service directly
    finding.service = MockService(
        name="test-deployment",
        namespace="default",
        resource_type="Deployment"
    )

    # Add links as proper Link objects

    finding.links = [
        Link(url="https://example.com/logs", name="View Logs"),
        Link(url="https://example.com/grafana", name="Grafana", type=LinkType.PROMETHEUS_GENERATOR_URL)
    ]

    return finding
Create a test finding with the given title and severity
tests/manual_tests/test_slack_integration_manual.py