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