mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-03 04:14:43 +00:00
Regression test for --cookiefile bug
This commit is contained in:
parent
6becc08284
commit
01b5dd619e
2 changed files with 14 additions and 0 deletions
3
tests/cookies.txt
Normal file
3
tests/cookies.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Host: example.org
|
||||
Path: /hello
|
||||
Set-cookie: om="nomnom"
|
||||
|
|
@ -18,8 +18,12 @@
|
|||
Test cookie routines.
|
||||
"""
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import linkcheck.cookies
|
||||
import linkcheck.configuration
|
||||
import linkcheck.director
|
||||
|
||||
|
||||
class TestCookies (unittest.TestCase):
|
||||
|
|
@ -66,3 +70,10 @@ class TestCookies (unittest.TestCase):
|
|||
]
|
||||
from_headers = linkcheck.cookies.from_headers
|
||||
self.assertRaises(ValueError, from_headers, "\r\n".join(lines))
|
||||
|
||||
def test_cookie_file (self):
|
||||
config = linkcheck.configuration.Configuration()
|
||||
here = os.path.dirname(__file__)
|
||||
config['cookiefile'] = os.path.join(here, 'cookies.txt')
|
||||
aggregate = linkcheck.director.get_aggregate(config)
|
||||
aggregate.add_request_session()
|
||||
|
|
|
|||
Loading…
Reference in a new issue