Skip to content

Commit 5bf10cc

Browse files
committed
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.
1 parent 8efd6d2 commit 5bf10cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_linkextractors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def test_extraction_encoding(self):
8080
])
8181

8282
self.assertEqual(lx.extract_links(response_latin1), [
83-
Link(url='http://example.com/sample_%%3Cspan%20class="x x-first x-last">F1.html', text=''),
84-
Link(url='http://example.com/sample_%%3Cspan%20class="x x-first x-last">E1.html', text='sample \xe1 text'.decode('latin1')),
83+
Link(url='http://example.com/sample_%%3Cspan%20class="x x-first x-last">C3%B1.html', text=''),
84+
Link(url='http://example.com/sample_%%3Cspan%20class="x x-first x-last">C3%A1.html', text='sample \xe1 text'.decode('latin1')),
8585
])
8686

8787
def test_matches(self):

0 commit comments

Comments
 (0)