def test_escape_html_chars_returns_string_with_five_chars_that_should_be_escaped(self): s = u"this&that\"so\'and<and>" expected = u"this&that"so'and<and>" result = utility.escape_html_chars(s) self.assertEqual(expected, result)
def test_escape_html_chars_returns_string_with_multiple_ampersands_escaped(self): s = u"this&that&so" expected = u"this&that&so" result = utility.escape_html_chars(s) self.assertEqual(expected, result)
def test_escape_html_chars_returns_empty_string_when_empty_string_passed(self): s = u"" expected = u"" result = utility.escape_html_chars(s) self.assertEqual(expected, result)
def test_escape_html_chars_returns_correctly_escaped_string_when_input_is_russian(self): s = u"об этом & о том" expected = u"об этом & о том" result = utility.escape_html_chars(s) self.assertEqual(expected, result)