Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Stop ignoring tests/server.py #15084

Merged
merged 21 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ exclude = (?x)
|synapse/storage/databases/__init__.py
|synapse/storage/databases/main/cache.py
|synapse/storage/schema/

|tests/server.py
)$

[mypy-synapse.federation.transport.client]
Expand Down
5 changes: 4 additions & 1 deletion tests/http/federation/test_matrix_federation_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
IOpenSSLClientConnectionCreator,
IProtocolFactory,
)
from twisted.internet.protocol import Factory
from twisted.internet.protocol import Factory, Protocol
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
from twisted.web._newclient import ResponseNeverReceived
from twisted.web.client import Agent
Expand Down Expand Up @@ -466,7 +466,10 @@ def _do_get_via_proxy(
else:
assert isinstance(proxy_server_transport, FakeTransport)
client_protocol = proxy_server_transport.other
assert isinstance(client_protocol, Protocol)
c2s_transport = client_protocol.transport
assert c2s_transport is not None
assert isinstance(c2s_transport, FakeTransport)
clokep marked this conversation as resolved.
Show resolved Hide resolved
c2s_transport.other = server_ssl_protocol

self.reactor.advance(0)
Expand Down
5 changes: 4 additions & 1 deletion tests/http/test_proxyagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_WrappingProtocol,
)
from twisted.internet.interfaces import IProtocol, IProtocolFactory
from twisted.internet.protocol import Factory
from twisted.internet.protocol import Factory, Protocol
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
from twisted.web.http import HTTPChannel

Expand Down Expand Up @@ -644,7 +644,10 @@ def _do_https_request_via_proxy(
else:
assert isinstance(proxy_server_transport, FakeTransport)
client_protocol = proxy_server_transport.other
assert isinstance(client_protocol, Protocol)
c2s_transport = client_protocol.transport
assert c2s_transport is not None
assert isinstance(c2s_transport, FakeTransport)
c2s_transport.other = server_ssl_protocol

self.reactor.advance(0)
Expand Down
Loading