From 1985eaac01a010fd27af6640d42e86b46d587fa2 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Mon, 18 Nov 2024 11:49:19 +0000 Subject: [PATCH] Different fix for MyPy complaining about StubTreq --- src/allmydata/test/test_storage_http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/allmydata/test/test_storage_http.py b/src/allmydata/test/test_storage_http.py index 185cfa995..7a64d6b2e 100644 --- a/src/allmydata/test/test_storage_http.py +++ b/src/allmydata/test/test_storage_http.py @@ -27,6 +27,7 @@ from queue import Queue from pycddl import ValidationError as CDDLValidationError from hypothesis import assume, given, strategies as st, settings as hypothesis_settings from fixtures import Fixture, TempDir, MonkeyPatch +from treq.client import HTTPClient from treq.testing import StubTreq from klein import Klein from hyperlink import DecodedURL @@ -714,7 +715,7 @@ class GenericHTTPAPITests(SyncTestCase): If nothing is given in the ``Authorization`` header at all an ``Unauthorized`` response is returned. """ - client = StubTreq(self.http.http_server.get_resource()) + client = HTTPClient(self.http.http_server.get_resource()) response = self.http.result_of_with_flush( client.request( "GET",