Exemplo 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())
Exemplo 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())
Exemplo n.º 3
0
 def test_fileobj(self):
     r = feedparser._open_resource(sys.stdin, '', '', '', '', [], {})
     self.assertTrue(r is sys.stdin)
Exemplo 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())
Exemplo 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())
Exemplo n.º 6
0
 def test_fileobj(self):
     r = feedparser._open_resource(sys.stdin, '', '', '', '', [], {})
     self.assertTrue(r is sys.stdin)