8
8
from edx_ace .channel import ChannelMap , ChannelType , get_channel_for_message
9
9
from edx_ace .channel .braze import BrazeEmailChannel
10
10
from edx_ace .channel .file import FileEmailChannel
11
+ from edx_ace .channel .push_notification import PushNotificationChannel
11
12
from edx_ace .errors import UnsupportedChannelError
12
13
from edx_ace .message import Message
13
14
from edx_ace .recipient import Recipient
@@ -45,6 +46,7 @@ def test_get_channel_for_message(self):
45
46
channel_map = ChannelMap ([
46
47
['file_email' , FileEmailChannel ()],
47
48
['braze_email' , BrazeEmailChannel ()],
49
+ ['push_notifications' , PushNotificationChannel ()],
48
50
])
49
51
50
52
transactional_msg = Message (options = {'transactional' : True }, ** self .msg_kwargs )
@@ -58,6 +60,7 @@ def test_get_channel_for_message(self):
58
60
assert isinstance (get_channel_for_message (ChannelType .EMAIL , transactional_msg ), FileEmailChannel )
59
61
assert isinstance (get_channel_for_message (ChannelType .EMAIL , transactional_campaign_msg ), BrazeEmailChannel )
60
62
assert isinstance (get_channel_for_message (ChannelType .EMAIL , info_msg ), BrazeEmailChannel )
63
+ assert isinstance (get_channel_for_message (ChannelType .PUSH , info_msg ), PushNotificationChannel )
61
64
62
65
with self .assertRaises (UnsupportedChannelError ):
63
66
assert get_channel_for_message (ChannelType .PUSH , transactional_msg )
0 commit comments