def test_translate_101(self): string1 = 'abcdcba' self.assertEqual(string_101.str_translate_101(string1, 'a', 'x'), 'xbcdcbx') string2 = 'hello' self.assertEqual(string_101.str_translate_101(string2, 'l', 'ff'), 'heffffo')
def test_str_translate_101_2(self): translated = string_101.str_translate_101("aaaa", "a", "x") expected = "xxxx" self.assertEqual(translated, expected)
def test_str_translate_101(self): translated = string_101.str_translate_101("abcdcba", "a", "x") expected = "xbcdcbx" self.assertEqual(translated, expected)
def test_str_translate_101(self): self.assertEqual(string_101.str_translate_101('Hello', 'l', 'a'), 'Heaao') self.assertEqual(string_101.str_translate_101('Pythen', 'e', 'o'), 'Python')
def test_str_translate_101_2(self): string = string_101.str_translate_101("Sax Lover", "a", "e") self.assertEqual(string, "Sex Lover")
def test_str_translate_101_1(self): string = string_101.str_translate_101("abcdcba", "a", "x") self.assertEqual(string, "xbcdcbx")
def test_lower4(self): s = 'cccaaa' self.assertEqual(string_101.str_translate_101(s, 'a', 'c'), 'cccccc') pass
def test_lower3(self): s = 'and' self.assertEqual(string_101.str_translate_101(s, 'a', 'b'), 'bnd') pass