From 4f8916d67e0deffa705f79912d4e55b674ebe3ff Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Thu, 19 Jun 2025 14:21:37 +0100 Subject: [PATCH] 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. --- tests/server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/server.py b/tests/server.py index f01708b77f..7ced29a07c 100644 --- a/tests/server.py +++ b/tests/server.py @@ -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