Ejemplo n.º 1
0
 def test_quote_xml_encoded(self):
     encoding = bindings.ExternalEncoding
     encoded = UNICODE_STR.encode(encoding)
     quoted = bindings.quote_xml(encoded)
     self.assertEqual(UNICODE_STR, quoted)
Ejemplo n.º 2
0
 def test_quote_xml_int(self):
     i = 65536
     s = bindings.quote_xml(i)
     self.assertEqual(str(i), s)
Ejemplo n.º 3
0
 def test_quote_xml_bool(self):
     b = True
     s = bindings.quote_xml(b)
     self.assertEqual(str(b), s)
Ejemplo n.º 4
0
 def test_quote_xml_empty(self):
     i = ''
     s = bindings.quote_xml(i)
     self.assertEqual('', s)
Ejemplo n.º 5
0
 def test_quote_xml(self):
     s = bindings.quote_xml(UNICODE_STR)
     self.assertEqual(s, UNICODE_STR)
Ejemplo n.º 6
0
 def test_quote_xml_zero(self):
     i = 0
     s = bindings.quote_xml(i)
     self.assertEqual(str(i), s)
Ejemplo n.º 7
0
 def test_quote_xml_none(self):
     i = None
     s = bindings.quote_xml(i)
     self.assertEqual('', s)
Ejemplo n.º 8
0
 def test_quote_xml_bool(self):
     b = True
     s = bindings.quote_xml(b)
     self.assertEqual(unicode(b), s)
Ejemplo n.º 9
0
 def test_quote_xml_encoded(self):
     encoding = bindings.ExternalEncoding
     encoded = UNICODE_STR.encode(encoding)
     quoted = bindings.quote_xml(encoded)
     self.assertEqual(UNICODE_STR, quoted)
Ejemplo n.º 10
0
 def test_quote_xml_int(self):
     i = 65536
     s = bindings.quote_xml(i)
     self.assertEqual(unicode(i), s)
Ejemplo n.º 11
0
 def test_quote_xml(self):
     s = bindings.quote_xml(UNICODE_STR)
     self.assertEqual(s, UNICODE_STR)
Ejemplo n.º 12
0
 def test_quote_xml_empty(self):
     i = ''
     s = bindings.quote_xml(i)
     self.assertEqual(u'', s)
Ejemplo n.º 13
0
 def test_quote_xml_none(self):
     i = None
     s = bindings.quote_xml(i)
     self.assertEqual(u'', s)
Ejemplo n.º 14
0
 def test_quote_xml_zero(self):
     i = 0
     s = bindings.quote_xml(i)
     self.assertEqual(unicode(i), s)