# Path: randtalkbot/message.py
# LOGGER = logging.getLogger('randtalkbot.message')
#     COMMAND_RE_PATTERN = re.compile(r'^/([a-z_]+)\b\s*(.*)$')
# class Message:
#     def __init__(self, message_json):
#     def decode_command_args(self):
#     def _init_audio(self, message_json):
#     def _init_document(self, message_json):
#     def _init_location(self, message_json):
#     def _init_photo(self, message_json):
#     def _init_sticker(self, message_json):
#     def _init_text(self, unused_message_json):
#     def _init_video(self, message_json):
#     def _init_voice(self, message_json):


import unittest
from unittest.mock import patch, Mock
from randtalkbot.message import Message, UnsupportedContentError
            Message.decode_command_args(message)

    def test_decode_command_args__loading_json_error(self):
        message = Mock()
        message.command_args = 'Ww==' # b'['
        with self.assertRaises(UnsupportedContentError):
            Message.decode_command_args(message)

    def test_init__audio(self):
        self.message_json['audio'] = {
            'file_id': 'foo',
            }
        message = Message(self.message_json)
        self.assertEqual(
            message.sending_kwargs,
            {
                'audio': 'foo',
                'duration': None,
                'performer': None,
                'title': None,
                },
            )

    def test_init__audio_with_info(self):
        self.message_json['audio'] = {
            'duration': 85,
            'file_id': 'foo',
            'performer': 'Pink Floyd',
            'title': 'Another Brick In The Wall Part 3',
            }

# Path: randtalkbot/message.py
# LOGGER = logging.getLogger('randtalkbot.message')
#     COMMAND_RE_PATTERN = re.compile(r'^/([a-z_]+)\b\s*(.*)$')
# class Message:
#     def __init__(self, message_json):
#     def decode_command_args(self):
#     def _init_audio(self, message_json):
#     def _init_document(self, message_json):
#     def _init_location(self, message_json):
#     def _init_photo(self, message_json):
#     def _init_sticker(self, message_json):
#     def _init_text(self, unused_message_json):
#     def _init_video(self, message_json):
#     def _init_voice(self, message_json):


# Path: tests/test_message.py
import unittest
from unittest.mock import patch, Mock
from randtalkbot.message import Message, UnsupportedContentError

            Message.decode_command_args(message)

    def test_decode_command_args__loading_json_error(self):
        message = Mock()
        message.command_args = 'Ww==' # b'['
        with self.assertRaises(UnsupportedContentError):
            Message.decode_command_args(message)

    def test_init__audio(self):
        self.message_json['audio'] = {
            'file_id': 'foo',
            }
        message = Message(self.message_json)
        self.assertEqual(
            message.sending_kwargs,
            {
                'audio': 'foo',
                'duration': None,
                'performer': None,
                'title': None,
                },
            )

    def test_init__audio_with_info(self):
        self.message_json['audio'] = {
            'duration': 85,
            'file_id': 'foo',
            'performer': 'Pink Floyd',
            'title': 'Another Brick In The Wall Part 3',
            }

        message = Message(self.message_json)