Fix tests on URL path encoding for links from latin1 document

UTF-8 is to be used for path component.
Page encoding only affects query part of URLs.
This commit is contained in:
Paul Tremberth 2016-04-07 22:43:47 +02:00
parent 8efd6d26ad
commit 5bf10cc8ff
1 changed files with 2 additions and 2 deletions

View File

@ -80,8 +80,8 @@ class LinkExtractorTestCase(unittest.TestCase):
])
self.assertEqual(lx.extract_links(response_latin1), [
Link(url='http://example.com/sample_%F1.html', text=''),
Link(url='http://example.com/sample_%E1.html', text='sample \xe1 text'.decode('latin1')),
Link(url='http://example.com/sample_%C3%B1.html', text=''),
Link(url='http://example.com/sample_%C3%A1.html', text='sample \xe1 text'.decode('latin1')),
])
def test_matches(self):