summary refs log tree commit diff
path: root/tests/http/server/__init__.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2022-05-10 14:06:56 +0100
committerGitHub <noreply@github.com>2022-05-10 14:06:56 +0100
commitdbb12a0b547914024316b6eb510069e900680e42 (patch)
treecd473b0e438a1500cae1ee1240bc3128871fbf40 /tests/http/server/__init__.py
parentAdd ability to cancel disconnected requests to `SynapseRequest` (#12588) (diff)
downloadsynapse-dbb12a0b547914024316b6eb510069e900680e42.tar.xz
Add helper class for testing request cancellation (#12630)
Also expose the `SynapseRequest` from `FakeChannel` in tests, so that
we can call `Request.connectionLost` to simulate a client disconnecting.

Signed-off-by: Sean Quah <seanq@element.io>
Diffstat (limited to 'tests/http/server/__init__.py')
-rw-r--r--tests/http/server/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/http/server/__init__.py b/tests/http/server/__init__.py
new file mode 100644
index 0000000000..3a5f22c022
--- /dev/null
+++ b/tests/http/server/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Matrix.org Foundation C.I.C.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.