Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/f/e/feedvalidator-HEAD/src/tests/testXmlEncodingDecode.py   feedvalidator(Download)
  def testProvidedEncoding(self):
    loggedEvents=[]
    (encoding, decoded) = xmlEncoding.decode(ctAX, 'UTF-8', '<x/>', loggedEvents)
    self.assertEquals('UTF-8', encoding)
    self._assertEqualUnicode(decoded, u'<x/>')
    self.assertEqual(loggedEvents, [])
 
    loggedEvents=[]
    (encoding, decoded) = xmlEncoding.decode(ctAX, 'UTF-8', '<?xml version="1.0" encoding="utf-8"?><x/>', loggedEvents)
  def testJustDeclaration(self):
    loggedEvents=[]
    (encoding, decoded) = xmlEncoding.decode(ctAX, None, '<?xml version="1.0" encoding="utf-8"?><x/>', loggedEvents)
    self.assertEquals(encoding, 'utf-8')
    self._assertEqualUnicode(decoded, u'<?xml version="1.0" encoding="utf-8"?><x/>')