summary refs log tree commit diff
path: root/tests/api
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2024-03-08 04:33:46 -0500
committerGitHub <noreply@github.com>2024-03-08 09:33:46 +0000
commit696cc9e802f63ba8657856d85f6982f49de14f27 (patch)
treedd704c2abb3865fd788968c97de147044ead6e8d /tests/api
parentFix joining remote rooms when a `on_new_event` callback is registered (#16973) (diff)
downloadsynapse-696cc9e802f63ba8657856d85f6982f49de14f27.tar.xz
Stabilize support for Retry-After header (MSC4014) (#16947)
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/test_errors.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/api/test_errors.py b/tests/api/test_errors.py
index 25fa93b9d8..efa3addf00 100644
--- a/tests/api/test_errors.py
+++ b/tests/api/test_errors.py
@@ -33,18 +33,14 @@ class LimitExceededErrorTestCase(unittest.TestCase):
         self.assertIn("needle", err.debug_context)
         self.assertNotIn("needle", serialised)
 
-    # Create a sub-class to avoid mutating the class-level property.
-    class LimitExceededErrorHeaders(LimitExceededError):
-        include_retry_after_header = True
-
     def test_limit_exceeded_header(self) -> None:
-        err = self.LimitExceededErrorHeaders(limiter_name="test", retry_after_ms=100)
+        err = LimitExceededError(limiter_name="test", retry_after_ms=100)
         self.assertEqual(err.error_dict(None).get("retry_after_ms"), 100)
         assert err.headers is not None
         self.assertEqual(err.headers.get("Retry-After"), "1")
 
     def test_limit_exceeded_rounding(self) -> None:
-        err = self.LimitExceededErrorHeaders(limiter_name="test", retry_after_ms=3001)
+        err = LimitExceededError(limiter_name="test", retry_after_ms=3001)
         self.assertEqual(err.error_dict(None).get("retry_after_ms"), 3001)
         assert err.headers is not None
         self.assertEqual(err.headers.get("Retry-After"), "4")