mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 21:17:54 +00:00
Merge pull request #1388 from meejah/4115.fix-ci-typechecks
4115: work around MyPy and treq for codechecks CI
This commit is contained in:
commit
e27a8300d9
0
newsfragments/4115.minor
Normal file
0
newsfragments/4115.minor
Normal file
@ -6,7 +6,6 @@ from __future__ import annotations
|
||||
|
||||
|
||||
from typing import (
|
||||
Union,
|
||||
Optional,
|
||||
Sequence,
|
||||
Mapping,
|
||||
@ -45,7 +44,6 @@ from zope.interface import implementer
|
||||
from hyperlink import DecodedURL
|
||||
import treq
|
||||
from treq.client import HTTPClient
|
||||
from treq.testing import StubTreq
|
||||
from OpenSSL import SSL
|
||||
from werkzeug.http import parse_content_range_header
|
||||
|
||||
@ -434,7 +432,7 @@ class StorageClient(object):
|
||||
# The URL should be a HTTPS URL ("https://...")
|
||||
_base_url: DecodedURL
|
||||
_swissnum: bytes
|
||||
_treq: Union[treq, StubTreq, HTTPClient]
|
||||
_treq: HTTPClient
|
||||
_pool: HTTPConnectionPool
|
||||
_clock: IReactorTime
|
||||
# Are we running unit tests?
|
||||
|
@ -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,7 +715,9 @@ 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(
|
||||
"GET",
|
||||
|
Loading…
Reference in New Issue
Block a user