import unittest from osc._private.api import xml_escape class TestXmlEscape(unittest.TestCase): def test_lt(self): actual = xml_escape("<") expected = "<" self.assertEqual(actual, expected) def test_gt(self): actual = xml_escape(">") expected = ">" self.assertEqual(actual, expected) def test_apos(self): actual = xml_escape("'") expected = "'" self.assertEqual(actual, expected) def test_quot(self): actual = xml_escape("\"") expected = """ self.assertEqual(actual, expected) def test_amp(self): actual = xml_escape("&") expected = "&" self.assertEqual(actual, expected) if __name__ == "__main__": unittest.main()