mirror of https://github.com/scrapy/scrapy.git
removing utf-16 xpathselector_iternodes testcase since the problem comes from UnicodeDammit's conversion meaning that the results of the test are misleading
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40304
This commit is contained in:
parent
8f80603acd
commit
c74364809e
Binary file not shown.
|
|
@ -27,13 +27,6 @@ class UtilsXmlTestCase(unittest.TestCase):
|
|||
self.assertEqual(attrs,
|
||||
[(['001'], ['Name 1'], ['Type 1']), (['002'], ['Name 2'], ['Type 2'])])
|
||||
|
||||
def test_iterator_utf16(self):
|
||||
samplefile = os.path.join(os.path.abspath(os.path.dirname(__file__)), "sample_data", "feeds", "feed-sample3.xml")
|
||||
body = open(samplefile).read()
|
||||
response = Response(domain="example.com", url="http://example.com", headers={"Content-type": "text/xml; encoding=UTF-16"}, body=body)
|
||||
self.assertEqual([x.x("@id").extract() for x in xpathselector_iternodes(response, 'product')],
|
||||
[['34017532'], ['34017557'], ['34017563'], ['34018057'], ['34018313'], ['34018599']])
|
||||
|
||||
def test_iterator_text(self):
|
||||
body = u"""<?xml version="1.0" encoding="UTF-8"?><products><product>one</product><product>two</product></products>"""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue