From bfca8c855241f0aa8c6c6e0625539bfcdcbb9528 Mon Sep 17 00:00:00 2001 From: Domenic Barbuzzi Date: Tue, 1 Oct 2019 14:42:26 -0400 Subject: [PATCH] Update unit tests for utils.latinify --- evennia/utils/tests/test_utils.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/evennia/utils/tests/test_utils.py b/evennia/utils/tests/test_utils.py index 74d82e202e..090126b67f 100644 --- a/evennia/utils/tests/test_utils.py +++ b/evennia/utils/tests/test_utils.py @@ -229,23 +229,14 @@ class LatinifyTest(TestCase): def setUp(self): super().setUp() - self.example_str = 'It says, “plugh.”' - self.example_ustr = u'It says, “plugh.”' - - self.expected_output = 'It says, "plugh."' + self.example_str = 'It naïvely says, “plugh.”' + self.expected_output = 'It naively says, "plugh."' def test_plain_string(self): result = utils.latinify(self.example_str) self.assertEqual(result, self.expected_output) - def test_unicode_string(self): - result = utils.latinify(self.example_ustr) - self.assertEqual(result, self.expected_output) - - def test_encoded_string(self): - result = utils.latinify(self.example_str.encode('utf8')) - self.assertEqual(result, self.expected_output) - def test_byte_string(self): - result = utils.latinify(utils.to_bytes(self.example_str)) + byte_str = utils.to_bytes(self.example_str) + result = utils.latinify(byte_str) self.assertEqual(result, self.expected_output)