From 99756525533e54a5dee1a358c68f88a4dc810583 Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Wed, 27 May 2020 19:30:22 +0000 Subject: Remove a couple more shim tests Since we removed the translate function from Message, we no longer need tests for it. I missed removing these in I9ba75874f64c4d7118c7679015c2e0eab5a69e4a so let's do that now. Change-Id: Idfefcfe81521f6f5a9f0c197bd7998ffa31a4470 --- oslo_i18n/tests/test_message.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/oslo_i18n/tests/test_message.py b/oslo_i18n/tests/test_message.py index 346e854..a71fb23 100644 --- a/oslo_i18n/tests/test_message.py +++ b/oslo_i18n/tests/test_message.py @@ -616,23 +616,6 @@ class MessageTestCase(test_base.BaseTestCase): self.assertEqual(zh_translation, msg.translation('zh')) self.assertEqual(fr_translation, msg.translation('fr')) - # TODO(bnemec): Remove these three tests when the translate compatibility - # shim is removed. - def test_translate_with_dict(self): - msg = _message.Message('abc') - # This dict is what you get back from str.maketrans('abc', 'xyz') - # We can't actually call that here because it doesn't exist on py2 - # and the string.maketrans that does behaves differently. - self.assertEqual('xyz', msg.translate({97: 120, 98: 121, 99: 122})) - - def test_translate_with_list(self): - msg = _message.Message('abc') - table = [six.unichr(x) for x in range(128)] - table[ord('a')] = 'b' - table[ord('b')] = 'c' - table[ord('c')] = 'd' - self.assertEqual('bcd', msg.translate(table)) - class TranslateMsgidTest(test_base.BaseTestCase): -- cgit v1.2.1