We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ceeed0 commit 38710f6Copy full SHA for 38710f6
tests/test_integration.py
@@ -2,6 +2,7 @@
2
import scrapy
3
from pytest_twisted import inlineCallbacks
4
from twisted.web.resource import Resource
5
+from w3lib.url import canonicalize_url
6
7
from scrapy_splash import SplashRequest
8
from .utils import crawl_items, requires_splash, HtmlResource
@@ -195,7 +196,7 @@ def _cookie_dict(har_cookies):
195
196
splash_headers = resp2.request.headers
197
headers = resp2.data['args']['headers']
198
cookies = resp2.data['args']['cookies']
- assert headers['Referer'].strip('/') == url.strip('/')
199
+ assert canonicalize_url(headers['Referer']) == canonicalize_url(url)
200
assert _cookie_dict(cookies) == {
201
# 'login': '1',
202
'x-set-splash': '1',
0 commit comments