File: no-connection-header.patch

package info (click to toggle)
python-mechanicalsoup 0.10.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 424 kB
  • sloc: python: 1,484; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Julian Andres Klode <juliank@ubuntu.com>
Date: Fri, 16 Aug 2019 00:19:34 +0500
Subject: Do not expect Connection header

Last-Update: 2019-03-04

That header seems to be gone from the json.
---
 tests/test_stateful_browser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_stateful_browser.py b/tests/test_stateful_browser.py
index f188faf..b1d8bfe 100644
--- a/tests/test_stateful_browser.py
+++ b/tests/test_stateful_browser.py
@@ -55,7 +55,7 @@ def test_submit_online(httpbin):
 
     assert json["headers"]["User-Agent"] == 'testing MechanicalSoup'
     # Ensure we haven't blown away any regular headers
-    expected_headers = ('Content-Length', 'Host', 'Content-Type', 'Connection',
+    expected_headers = ('Content-Length', 'Host', 'Content-Type',
                         'Accept', 'User-Agent', 'Accept-Encoding')
     assert set(expected_headers).issubset(json["headers"].keys())