summaryrefslogtreecommitdiff
path: root/dev-python/klein/files/klein-21.8.0-test_resource.patch
blob: c9779c46ac17deefc12b458cf70f4bba0a756f10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
https://github.com/twisted/klein/commit/bce8b85036a6d185b9e8aab037c805f81354544c

From bce8b85036a6d185b9e8aab037c805f81354544c Mon Sep 17 00:00:00 2001
From: Glyph <glyph@twistedmatrix.com>
Date: Tue, 31 May 2022 17:44:13 -0700
Subject: [PATCH] testing exact content-length is way too strict

--- a/src/klein/test/test_resource.py
+++ b/src/klein/test/test_resource.py
@@ -2,7 +2,7 @@
 from io import BytesIO
 from types import MappingProxyType
 from typing import Any, Callable, List, Mapping, Optional, Sequence, cast
-from unittest.mock import Mock, call
+from unittest.mock import ANY, Mock, call
 from urllib.parse import parse_qs
 
 from werkzeug.exceptions import NotFound
@@ -642,7 +642,7 @@ def foo(request: IRequest) -> KleinRenderable:
         request.setHeader.assert_has_calls(
             [
                 call(b"Content-Type", b"text/html; charset=utf-8"),
-                call(b"Content-Length", b"258"),
+                call(b"Content-Length", ANY),
                 call(b"Location", b"http://localhost:8080/foo/"),
             ]
         )