-
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
5bee838
commit 36ce90e
Showing
26 changed files
with
105 additions
and
97 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
Empty file.
Empty file.
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 @@ | ||
from .api.api import Api |
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
meta/api/api_request_sender.py → metapython/api/api_request_sender.py
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
File renamed without changes.
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,6 @@ | ||
from .text_message import TextMessage | ||
from .action_message import ActionMessage | ||
from .media_message import MediaMessage | ||
from .quick_reply_message import QuickRepliesMessage, QuickReplyMessage | ||
from .generic_message import ElementMessage, ElementsMessage | ||
from .button_message import ButtonMessage, ButtonsMessage |
4 changes: 2 additions & 2 deletions
4
meta/api/messages/action_message.py → metapython/api/messages/action_message.py
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
2 changes: 1 addition & 1 deletion
2
meta/api/messages/media_message.py → metapython/api/messages/media_message.py
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
2 changes: 1 addition & 1 deletion
2
meta/api/messages/message.py → metapython/api/messages/message.py
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
2 changes: 1 addition & 1 deletion
2
meta/api/messages/text_message.py → metapython/api/messages/text_message.py
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
from meta.api.messages.action_message import Action , SenderAction | ||
from metapython.api.messages.action_message import ActionMessage , SenderAction | ||
import pytest | ||
|
||
|
||
def test_creation(): | ||
action_message = Action(SenderAction.MARK_SEEN) | ||
action_message = ActionMessage(SenderAction.MARK_SEEN) | ||
|
||
assert action_message.event == SenderAction.MARK_SEEN | ||
|
||
|
||
def test_creation_fail(): | ||
|
||
with pytest.raises(ValueError, match="value of param event must be 'mark_seen', 'typing_on', or 'typing_off'"): | ||
Action("wrong_type") | ||
ActionMessage("wrong_type") | ||
|
||
|
||
def test_asdict(): | ||
message_dict = dict( | ||
sender_action=SenderAction.TYPING_OFF | ||
) | ||
|
||
action_message_dict = Action(SenderAction.TYPING_OFF).asdict() | ||
action_message_dict = ActionMessage(SenderAction.TYPING_OFF).asdict() | ||
|
||
assert message_dict == action_message_dict |
Oops, something went wrong.