Exemple #1
0
 def test_escape_attr(self):
     # unicode
     self.assertEquals(u'"Me & you!"',
                 xmlio._escape_attr(u'"Me\x01 & you\x86!"'))
     # str
     self.assertEquals('"Me & you!"',
                 xmlio._escape_attr('"Me\x01 & you\x86!"'))
     # not basestring
     self.assertEquals(42, xmlio._escape_text(42))
Exemple #2
0
 def test_escape_attr(self):
     # unicode
     self.assertEquals(u'"Me & you!"',
                       xmlio._escape_attr(u'"Me\x01 & you\x86!"'))
     # str
     self.assertEquals('"Me & you!"',
                       xmlio._escape_attr('"Me\x01 & you\x86!"'))
     # not basestring
     self.assertEquals(42, xmlio._escape_text(42))
Exemple #3
0
 def setUp(self):
     self.work_dir = tempfile.mkdtemp(prefix='bitten_test')
     self.python_path = xmlio._escape_attr(sys.executable)
Exemple #4
0
 def setUp(self):
     self.work_dir = tempfile.mkdtemp(prefix='bitten_test')
     self.python_path = xmlio._escape_attr(sys.executable)