forked from mozilla/bugbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_mail.py
28 lines (20 loc) · 831 Bytes
/
test_mail.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# coding: utf-8
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import unittest
from bugbot.mail import replaceUnicode
class TestMail(unittest.TestCase):
def test_replaceUnicode(self):
s = "some letters and a é and a è, what else ?..."
r = replaceUnicode(s)
assert r == "some letters and a é and a è, what else ?..."
s = "some letters and a é and a è"
r = replaceUnicode(s)
assert r == "some letters and a é and a è"
s = "some letters with no accents, just pure ascii"
r = replaceUnicode(s)
assert r == s
s = ""
r = replaceUnicode(s)
assert r == s