mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix test failing on Qt 6.8
This commit is contained in:
parent
84aa726181
commit
6a5799edd9
@ -140,13 +140,16 @@ class TestFetchBackend(unittest.TestCase):
|
||||
ans.extend(v)
|
||||
self.ae(expected, tuple(ans))
|
||||
|
||||
def has_header(name):
|
||||
self.assertIn(name.lower(), [h.lower() for h in r['headers']])
|
||||
|
||||
try:
|
||||
r = get()
|
||||
self.ae(r['method'], 'GET')
|
||||
self.ae(r['request_count'], 1)
|
||||
header('th', '1')
|
||||
header('User-Agent', 'test-ua')
|
||||
self.assertIn('Accept-Encoding', r['headers'])
|
||||
has_header('accept-encoding')
|
||||
r = get()
|
||||
self.ae(r['request_count'], 2)
|
||||
header('Cookie', 'sc=1')
|
||||
|
Loading…
x
Reference in New Issue
Block a user