def test_send_message_payload(self, set_auth_headers_mock, set_auth_mock): set_auth_mock.return_value = None set_auth_headers_mock.return_value = None send_message = SendMessage(settings=self.settings) self.assertEqual(send_message.build_payload(message='Test message', room_id="#general"), {'roomId': '#general', 'text': 'Test message'})
def test_send_message_payload(self, set_auth_headers_mock, set_auth_mock): set_auth_mock.return_value = None set_auth_headers_mock.return_value = None send_message = SendMessage(settings=self.settings) self.assertEqual(send_message.build_payload(message='Test message', room_id="#general"), {'roomId': '#general', 'text': 'Test message'})
def send_message(self, message, room_id, **kwargs): """ Send a message to a given room """ return SendMessage(settings=self.settings, **kwargs).call(message=message, room_id=room_id, **kwargs)