diff --git a/src/allmydata/test/test_storage_http.py b/src/allmydata/test/test_storage_http.py index 32fcd084b..c42891a4a 100644 --- a/src/allmydata/test/test_storage_http.py +++ b/src/allmydata/test/test_storage_http.py @@ -27,7 +27,8 @@ 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.testing import StubTreq +from treq.client import HTTPClient +from treq.testing import StubTreq, RequestTraversalAgent from klein import Klein from hyperlink import DecodedURL from collections_extended import RangeMap @@ -714,9 +715,11 @@ 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( + RequestTraversalAgent(self.http.http_server.get_resource()) + ) response = self.http.result_of_with_flush( - client.request( # type: ignore[attr-defined] + client.request( "GET", "http://127.0.0.1/storage/v1/version", ),