summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/api/test_errors.py8
-rw-r--r--tests/rest/client/test_login.py3
2 files changed, 2 insertions, 9 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")
diff --git a/tests/rest/client/test_login.py b/tests/rest/client/test_login.py
index 3d3a7b0aa7..3a1f150082 100644
--- a/tests/rest/client/test_login.py
+++ b/tests/rest/client/test_login.py
@@ -177,7 +177,6 @@ class LoginRestServletTestCase(unittest.HomeserverTestCase):
                 # rc_login dict here, we need to set this manually as well
                 "account": {"per_second": 10000, "burst_count": 10000},
             },
-            "experimental_features": {"msc4041_enabled": True},
         }
     )
     def test_POST_ratelimiting_per_address(self) -> None:
@@ -229,7 +228,6 @@ class LoginRestServletTestCase(unittest.HomeserverTestCase):
                 # rc_login dict here, we need to set this manually as well
                 "address": {"per_second": 10000, "burst_count": 10000},
             },
-            "experimental_features": {"msc4041_enabled": True},
         }
     )
     def test_POST_ratelimiting_per_account(self) -> None:
@@ -278,7 +276,6 @@ class LoginRestServletTestCase(unittest.HomeserverTestCase):
                 "address": {"per_second": 10000, "burst_count": 10000},
                 "failed_attempts": {"per_second": 0.17, "burst_count": 5},
             },
-            "experimental_features": {"msc4041_enabled": True},
         }
     )
     def test_POST_ratelimiting_per_account_failed_attempts(self) -> None: