# Path: messagebird/serde.py
# def json_serialize(obj):
#     try:
#         return json.dumps(obj, ensure_ascii=False).encode('utf-8')
#     except TypeError:
#         return json.dumps(obj, default=lambda o: o.__dict__, ensure_ascii=False).encode('utf-8')


import unittest
from messagebird.serde import json_serialize
# coding=utf-8



class TestJSONSerDe(unittest.TestCase):

    def test_tr_check(self):
        self.assertEqual(json_serialize({'body': 'Pijamalı hasta, yağız şoföre çabucak güvendi.'}),
                         """{"body": "Pijamalı hasta, yağız şoföre çabucak güvendi."}""".encode("utf-8"))

    def test_jp_check(self):

# Path: messagebird/serde.py
# def json_serialize(obj):
#     try:
#         return json.dumps(obj, ensure_ascii=False).encode('utf-8')
#     except TypeError:
#         return json.dumps(obj, default=lambda o: o.__dict__, ensure_ascii=False).encode('utf-8')


# Path: tests/test_serde.py
import unittest
from messagebird.serde import json_serialize

# coding=utf-8



class TestJSONSerDe(unittest.TestCase):

    def test_tr_check(self):
        self.assertEqual(json_serialize({'body': 'Pijamalı hasta, yağız şoföre çabucak güvendi.'}),
                         """{"body": "Pijamalı hasta, yağız şoföre çabucak güvendi."}""".encode("utf-8"))

    def test_jp_check(self):

        self.assertEqual(json_serialize({'body': 'いろはにほへとちりぬるを'}),