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:
Andrew Morgan
2025-06-19 14:21:37 +01:00
parent 07f91f805e
commit 4f8916d67e

View File

@@ -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