summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-08-11 15:44:45 -0400
committerGitHub <noreply@github.com>2021-08-11 15:44:45 -0400
commit98a3355d9a58538cfbc1c88020e6b6d9bccea516 (patch)
tree38c932d95a739c2e425ea6c555c565bb41f1fed9 /tests
parentAdmin API to delete media for a specific user (#10558) (diff)
downloadsynapse-98a3355d9a58538cfbc1c88020e6b6d9bccea516.tar.xz
Update the pagination parameter name based on MSC2946 review. (#10579)
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_space_summary.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/handlers/test_space_summary.py b/tests/handlers/test_space_summary.py
index 806b886fe4..83c2bdd8f9 100644
--- a/tests/handlers/test_space_summary.py
+++ b/tests/handlers/test_space_summary.py
@@ -466,19 +466,19 @@ class SpaceSummaryTestCase(unittest.HomeserverTestCase):
         expected: List[Tuple[str, Iterable[str]]] = [(self.space, room_ids)]
         expected += [(room_id, ()) for room_id in room_ids[:6]]
         self._assert_hierarchy(result, expected)
-        self.assertIn("next_token", result)
+        self.assertIn("next_batch", result)
 
         # Check the next page.
         result = self.get_success(
             self.handler.get_room_hierarchy(
-                self.user, self.space, limit=5, from_token=result["next_token"]
+                self.user, self.space, limit=5, from_token=result["next_batch"]
             )
         )
         # The result should have the space and the room in it, along with a link
         # from space -> room.
         expected = [(room_id, ()) for room_id in room_ids[6:]]
         self._assert_hierarchy(result, expected)
-        self.assertNotIn("next_token", result)
+        self.assertNotIn("next_batch", result)
 
     def test_invalid_pagination_token(self):
         """"""
@@ -493,12 +493,12 @@ class SpaceSummaryTestCase(unittest.HomeserverTestCase):
         result = self.get_success(
             self.handler.get_room_hierarchy(self.user, self.space, limit=7)
         )
-        self.assertIn("next_token", result)
+        self.assertIn("next_batch", result)
 
         # Changing the room ID, suggested-only, or max-depth causes an error.
         self.get_failure(
             self.handler.get_room_hierarchy(
-                self.user, self.room, from_token=result["next_token"]
+                self.user, self.room, from_token=result["next_batch"]
             ),
             SynapseError,
         )
@@ -507,13 +507,13 @@ class SpaceSummaryTestCase(unittest.HomeserverTestCase):
                 self.user,
                 self.space,
                 suggested_only=True,
-                from_token=result["next_token"],
+                from_token=result["next_batch"],
             ),
             SynapseError,
         )
         self.get_failure(
             self.handler.get_room_hierarchy(
-                self.user, self.space, max_depth=0, from_token=result["next_token"]
+                self.user, self.space, max_depth=0, from_token=result["next_batch"]
             ),
             SynapseError,
         )