mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 17:23:55 +00:00
Add parsePOSTFormSubmission arg to FakeSite
Twisted's `Site` exposes `_parsePOSTFormSubmission` which is accessed by `Request` during initialisation (since Twisted 25.5.0). Provide the same attribute so that tests remain compatible across Twisted versions.
This commit is contained in:
1 parent
07f91f805e
commit
4f8916d67e
1 file changed
+3
@@ -343,6 +343,8 @@ class FakeSite:
|
||||
self,
|
||||
resource: IResource,
|
||||
reactor: IReactorTime,
|
||||
*,
|
||||
parsePOSTFormSubmission: bool = True,
|
||||
):
|
||||
"""
|
||||
|
||||
@@ -351,6 +353,7 @@ class FakeSite:
|
||||
"""
|
||||
self._resource = resource
|
||||
self.reactor = reactor
|
||||
self._parsePOSTFormSubmission = parsePOSTFormSubmission
|
||||
|
||||
def getResourceFor(self, request: Request) -> IResource:
|
||||
return self._resource
|
||||
|
||||
Reference in new issue
Block a user