2026-01-13 05:17:57 +02:00

31 lines
820 B
Python

import uuid
import random
from typing import Dict, Any, Optional
from app.providers.base import BaseProvider
class MockProvider(BaseProvider):
"""Mock provider for testing without external API calls"""
def send_message(
self,
to: str,
template_name: Optional[str],
template_body: str,
variables: Dict[str, str],
language: str = "en"
) -> str:
"""
Simulate sending a message.
Returns a fake message ID.
"""
# Simulate message ID
message_id = f"mock_{uuid.uuid4().hex[:16]}"
# Simulate random delivery statuses
# In a real implementation, you'd track these and update via webhooks
return message_id
def get_provider_name(self) -> str:
return "mock"