Rename to EndpointCancellationTestCase to EndpointCancellationTestHelperMixin
Signed-off-by: Sean Quah <seanq@element.io>
This commit is contained in:
@@ -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."""
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user