-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4cc6f5
commit f89636e
Showing
10 changed files
with
386 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from abc import ABC | ||
from abc import abstractmethod | ||
|
||
|
||
class MessagingBaseClass(ABC): | ||
"""MessagingBaseClass Base class for messaging implementation | ||
All messaging classes implement this interface. | ||
""" | ||
|
||
@property | ||
@abstractmethod | ||
def connection(self): | ||
"""A property for the connection object where messages are sent.""" | ||
|
||
@abstractmethod | ||
def send_message(self): | ||
"""Method for sending the message.""" | ||
|
||
|
||
class MockMessageConnection(MessagingBaseClass): | ||
"""Mock implementation of base class. Consumes `send_message` calls but does no work.""" | ||
|
||
connection: None = None | ||
"""Connection object. Not needed in a mock but must be implemented""" | ||
|
||
@staticmethod | ||
def send_message(*args, **kwargs): | ||
"""Consumes requests to send a message but does nothing with it.""" | ||
pass |
Oops, something went wrong.