Esempio n. 1
0
 def test_unicode_2(self):
     s = u'<feed><item><title>t\u00e9xt</title></item></feed>'
     r = feedparser._open_resource(s, '', '', '', '', [], {})
     self.assertEqual(s.encode('utf-8'), r.read())
Esempio n. 2
0
 def test_string(self):
     s = '<feed><item><title>text</title></item></feed>'
     r = feedparser._open_resource(s, '', '', '', '', [], {})
     self.assertEqual(s.encode('utf-8'), r.read())
Esempio n. 3
0
 def test_fileobj(self):
     r = feedparser._open_resource(sys.stdin, '', '', '', '', [], {})
     self.assertTrue(r is sys.stdin)
Esempio n. 4
0
 def test_unicode_2(self):
     s = u'<feed><item><title>t\u00e9xt</title></item></feed>'
     r = feedparser._open_resource(s, '', '', '', '', [], {})
     self.assertEqual(s.encode('utf-8'), r.read())
Esempio n. 5
0
 def test_string(self):
     s = '<feed><item><title>text</title></item></feed>'
     r = feedparser._open_resource(s, '', '', '', '', [], {})
     self.assertEqual(s.encode('utf-8'), r.read())
Esempio n. 6
0
 def test_fileobj(self):
     r = feedparser._open_resource(sys.stdin, '', '', '', '', [], {})
     self.assertTrue(r is sys.stdin)