-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from mehmetminanc/encoding-fix
Some encoding fixes
- Loading branch information
Showing
3 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# coding=utf-8 | ||
import unittest | ||
|
||
from messagebird.serde import json_serialize | ||
|
||
|
||
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': 'いろはにほへとちりぬるを'}), | ||
"""{"body": "いろはにほへとちりぬるを"}""".encode("utf-8")) |