Add reactor to SynapseRequest and fix up types. (#10868)

This commit is contained in:
Erik Johnston 2021-09-24 11:01:25 +01:00 committed by GitHub
parent fa74536384
commit 50022cff96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 123 additions and 82 deletions

View file

@ -152,7 +152,8 @@ class TerseJsonTestCase(LoggerCleanupMixin, TestCase):
site = Mock(spec=["site_tag", "server_version_string", "getResourceFor"])
site.site_tag = "test-site"
site.server_version_string = "Server v1"
request = SynapseRequest(FakeChannel(site, None))
site.reactor = Mock()
request = SynapseRequest(FakeChannel(site, None), site)
# Call requestReceived to finish instantiating the object.
request.content = BytesIO()
# Partially skip some of the internal processing of SynapseRequest.