# Path: kiel/protocol/messages.py
# class MessageSet(object):
# class Message(Part):
#     def __init__(self, messages):
#     def compressed(cls, compression, msgs):
#     def render(self):
#     def __eq__(self, other):
#     def __repr__(self):
#     def parse(cls, buff, offset, size=None):
#     def render(self, parts=None):
#     def parse(cls, buff, offset):
#     def __eq__(self, other):
#     def __repr__(self):


import json
import unittest
from kiel.protocol import messages



class MessagesTests(unittest.TestCase):

    def test_message_repr(self):
        msg = messages.Message(
            crc=0,
            magic=0,
            attributes=0,
            key="foo",
            value=json.dumps({"bar": "bazz"})
        )

        self.assertEqual(repr(msg), 'foo => {"bar": "bazz"}')

    def test_messageset_repr(self):

# Path: kiel/protocol/messages.py
# class MessageSet(object):
# class Message(Part):
#     def __init__(self, messages):
#     def compressed(cls, compression, msgs):
#     def render(self):
#     def __eq__(self, other):
#     def __repr__(self):
#     def parse(cls, buff, offset, size=None):
#     def render(self, parts=None):
#     def parse(cls, buff, offset):
#     def __eq__(self, other):
#     def __repr__(self):


# Path: tests/protocol/test_messages.py
import json
import unittest
from kiel.protocol import messages




class MessagesTests(unittest.TestCase):

    def test_message_repr(self):
        msg = messages.Message(
            crc=0,
            magic=0,
            attributes=0,
            key="foo",
            value=json.dumps({"bar": "bazz"})
        )

        self.assertEqual(repr(msg), 'foo => {"bar": "bazz"}')

    def test_messageset_repr(self):

        msg1 = messages.Message(