summary refs log tree commit diff
diff options
context:
space:
mode:
authorSean Quah <seanq@element.io>2022-05-06 20:27:52 +0100
committerSean Quah <seanq@element.io>2022-05-06 20:54:30 +0100
commit08acc0c293d8d02fc0db484ca112fcf3f13ced61 (patch)
treecb0e53a22f4c1f59e7d85f8d8dd4f584658949af
parentDon't trash the logging context when cancelling request processing (diff)
downloadsynapse-08acc0c293d8d02fc0db484ca112fcf3f13ced61.tar.xz
Rename to `EndpointCancellationTestCase` to `EndpointCancellationTestHelperMixin`
Signed-off-by: Sean Quah <seanq@element.io>
-rw-r--r--tests/federation/transport/server/test__base.py4
-rw-r--r--tests/http/server/_base.py2
-rw-r--r--tests/http/test_servlet.py4
-rw-r--r--tests/replication/http/test__base.py4
-rw-r--r--tests/test_server.py6
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/federation/transport/server/test__base.py b/tests/federation/transport/server/test__base.py

index 7d02311610..ac3695a8cc 100644 --- a/tests/federation/transport/server/test__base.py +++ b/tests/federation/transport/server/test__base.py
@@ -24,7 +24,7 @@ from synapse.types import JsonDict from synapse.util.ratelimitutils import FederationRateLimiter from tests import unittest -from tests.http.server._base import EndpointCancellationTestCase +from tests.http.server._base import EndpointCancellationTestHelperMixin class CancellableFederationServlet(BaseFederationServlet): @@ -55,7 +55,7 @@ class CancellableFederationServlet(BaseFederationServlet): class BaseFederationServletCancellationTests( - unittest.FederatingHomeserverTestCase, EndpointCancellationTestCase + unittest.FederatingHomeserverTestCase, EndpointCancellationTestHelperMixin ): """Tests for `BaseFederationServlet` cancellation.""" diff --git a/tests/http/server/_base.py b/tests/http/server/_base.py
index b0c333b00f..dc82085581 100644 --- a/tests/http/server/_base.py +++ b/tests/http/server/_base.py
@@ -29,7 +29,7 @@ from tests import unittest from tests.server import FakeChannel, ThreadedMemoryReactorClock -class EndpointCancellationTestCase(unittest.TestCase): +class EndpointCancellationTestHelperMixin(unittest.TestCase): """Provides helper methods for testing cancellation of endpoints.""" def _test_disconnect( diff --git a/tests/http/test_servlet.py b/tests/http/test_servlet.py
index 0258177021..ad521525cf 100644 --- a/tests/http/test_servlet.py +++ b/tests/http/test_servlet.py
@@ -30,7 +30,7 @@ from synapse.server import HomeServer from synapse.types import JsonDict from tests import unittest -from tests.http.server._base import EndpointCancellationTestCase +from tests.http.server._base import EndpointCancellationTestHelperMixin def make_request(content): @@ -107,7 +107,7 @@ class CancellableRestServlet(RestServlet): class TestRestServletCancellation( - unittest.HomeserverTestCase, EndpointCancellationTestCase + unittest.HomeserverTestCase, EndpointCancellationTestHelperMixin ): """Tests for `RestServlet` cancellation.""" diff --git a/tests/replication/http/test__base.py b/tests/replication/http/test__base.py
index a87222c04f..a5ab093a27 100644 --- a/tests/replication/http/test__base.py +++ b/tests/replication/http/test__base.py
@@ -25,7 +25,7 @@ from synapse.server import HomeServer from synapse.types import JsonDict from tests import unittest -from tests.http.server._base import EndpointCancellationTestCase +from tests.http.server._base import EndpointCancellationTestHelperMixin class CancellableReplicationEndpoint(ReplicationEndpoint): @@ -70,7 +70,7 @@ class UncancellableReplicationEndpoint(ReplicationEndpoint): class ReplicationEndpointCancellationTestCase( - unittest.HomeserverTestCase, EndpointCancellationTestCase + unittest.HomeserverTestCase, EndpointCancellationTestHelperMixin ): """Tests for `ReplicationEndpoint` cancellation.""" diff --git a/tests/test_server.py b/tests/test_server.py
index 493b673f6d..0f1eb43cbc 100644 --- a/tests/test_server.py +++ b/tests/test_server.py
@@ -34,7 +34,7 @@ from synapse.types import JsonDict from synapse.util import Clock from tests import unittest -from tests.http.server._base import EndpointCancellationTestCase +from tests.http.server._base import EndpointCancellationTestHelperMixin from tests.server import ( FakeSite, ThreadedMemoryReactorClock, @@ -407,7 +407,7 @@ class CancellableDirectServeHtmlResource(DirectServeHtmlResource): return HTTPStatus.OK, b"ok" -class DirectServeJsonResourceCancellationTests(EndpointCancellationTestCase): +class DirectServeJsonResourceCancellationTests(EndpointCancellationTestHelperMixin): """Tests for `DirectServeJsonResource` cancellation.""" def setUp(self): @@ -441,7 +441,7 @@ class DirectServeJsonResourceCancellationTests(EndpointCancellationTestCase): ) -class DirectServeHtmlResourceCancellationTests(EndpointCancellationTestCase): +class DirectServeHtmlResourceCancellationTests(EndpointCancellationTestHelperMixin): """Tests for `DirectServeHtmlResource` cancellation.""" def setUp(self):