diff --git a/reviewboard/testing/testcase.py b/reviewboard/testing/testcase.py
index c2f6ae576d3e4974ddec348be5fc5b64cb6b3fcf..8ee9948addd7c6d329bebb182aa11ca18c56ecc4 100644
--- a/reviewboard/testing/testcase.py
+++ b/reviewboard/testing/testcase.py
@@ -7,11 +7,11 @@
 import warnings
 from contextlib import contextmanager
 from datetime import datetime, timedelta, timezone
-from typing import (Any, Callable, Dict, Iterator, List, Optional, Sequence,
-                    TYPE_CHECKING, Tuple, Type, Union)
+from typing import (Any, Callable, List, Optional, TYPE_CHECKING, Tuple, Type,
+                    Union)
 from uuid import uuid4
 
-import kgb
+from django_assert_queries.testing import assert_queries
 from django.contrib.auth.models import AnonymousUser, Permission, User
 from django.contrib.messages.middleware import MessageMiddleware
 from django.contrib.sessions.middleware import SessionMiddleware
@@ -25,6 +25,8 @@
 from django.utils.timezone import now
 from djblets.registries.errors import AlreadyRegisteredError, ItemLookupError
 from djblets.secrets.token_generators import token_generator_registry
+from housekeeping import func_deprecated
+import kgb
 from djblets.testing.testcases import (FixturesCompilerMixin,
                                        TestCase as DjbletsTestCase)
 from djblets.util.symbols import UNSET, Unsettable
@@ -40,6 +42,7 @@
 from reviewboard.certs.cert import (Certificate,
                                     CertificateBundle,
                                     CertificateFingerprints)
+from reviewboard.deprecation import RemovedInReviewBoard90Warning
 from reviewboard.diffviewer.differ import DiffCompatVersion
 from reviewboard.diffviewer.models import (DiffCommit, DiffSet, DiffSetHistory,
                                            FileDiff)
@@ -65,10 +68,11 @@
 from reviewboard.webapi.models import WebAPIToken
 
 if TYPE_CHECKING:
+    from collections.abc import Iterator, Sequence
     from contextlib import AbstractContextManager
 
     from django.http import HttpRequest
-    from djblets.db.query_comparator import ExpectedQuery
+    from django_assert_queries import ExpectedQuery
     from typelets.json import JSONDict
 
     from reviewboard.changedescs.models import ChangeDescription
@@ -594,16 +598,23 @@
             token_info=token_info,
             **kwargs)
 
+    @func_deprecated(
+        RemovedInReviewBoard90Warning,
+        message=(
+            'assertQueries() has been deprecated in favor of '
+            'django_assert_queries.assert_queries(), and will be removed in '
+            'Review Board 10.'
+        ),
+    )
     def assertQueries(
         self,
-        queries: Sequence[Union[ExpectedQuery,
-                                Dict[str, Any]]],
-        num_statements: Optional[int] = None,
+        queries: Sequence[ExpectedQuery | dict[str, Any]],
+        num_statements: (int | None) = None,
         *,
         with_tracebacks: bool = False,
         traceback_size: int = 15,
-        check_join_types: Optional[bool] = True,
-        check_subqueries: Optional[bool] = True,
+        check_join_types: bool = True,
+        check_subqueries: bool = True,
     ) -> AbstractContextManager[None]:
         """Assert the number and complexity of queries.
 
@@ -633,7 +644,7 @@
                 If enabled, tracebacks for queries will be included in
                 results.
 
-            tracebacks_size (int, optional):
+            traceback_size (int, optional):
                 The size of any tracebacks, in number of lines.
 
                 The default is 15.
@@ -659,12 +670,12 @@
                 The parameters passed, or the queries compared, failed
                 expectations.
         """
-        return super().assertQueries(queries=queries,
-                                     num_statements=num_statements,
-                                     with_tracebacks=with_tracebacks,
-                                     traceback_size=traceback_size,
-                                     check_join_types=check_join_types,
-                                     check_subqueries=check_subqueries)
+        return assert_queries(queries=queries,
+                              num_statements=num_statements,
+                              with_tracebacks=with_tracebacks,
+                              traceback_size=traceback_size,
+                              check_join_types=check_join_types,
+                              check_subqueries=check_subqueries)
 
     @contextmanager
     def assert_warns(
@@ -693,15 +704,6 @@
             # default, stop filtering them.
             warnings.simplefilter('always')
 
-            # Now that we've done that, some warnings may come in that we
-            # really don't want. We want to turn those back off.
-            try:
-                from django.utils.deprecation import RemovedInDjango20Warning
-                warnings.filterwarnings('ignore',
-                                        category=RemovedInDjango20Warning)
-            except ImportError:
-                pass
-
             self.assertEqual(len(w), 0)
 
             yield
