Coverage for src/kwai/core/mail/mailer.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2024-01-01 00:00 +0000

1"""Module that defines an interface for a mail service.""" 

2 

3from abc import ABC, abstractmethod 

4 

5from .message import Message 

6 

7 

8class MailerException(Exception): 

9 """Exception raised from a Mailer.""" 

10 

11 

12class Mailer(ABC): 

13 """Interface for a mail service.""" 

14 

15 @abstractmethod 

16 def send(self, message: Message): 

17 """Send the message.""" 

18 raise NotImplementedError