@@ -466,19 +466,19 @@ def test_pagination(self):
466466 expected : List [Tuple [str , Iterable [str ]]] = [(self .space , room_ids )]
467467 expected += [(room_id , ()) for room_id in room_ids [:6 ]]
468468 self ._assert_hierarchy (result , expected )
469- self .assertIn ("next_token " , result )
469+ self .assertIn ("next_batch " , result )
470470
471471 # Check the next page.
472472 result = self .get_success (
473473 self .handler .get_room_hierarchy (
474- self .user , self .space , limit = 5 , from_token = result ["next_token " ]
474+ self .user , self .space , limit = 5 , from_token = result ["next_batch " ]
475475 )
476476 )
477477 # The result should have the space and the room in it, along with a link
478478 # from space -> room.
479479 expected = [(room_id , ()) for room_id in room_ids [6 :]]
480480 self ._assert_hierarchy (result , expected )
481- self .assertNotIn ("next_token " , result )
481+ self .assertNotIn ("next_batch " , result )
482482
483483 def test_invalid_pagination_token (self ):
484484 """"""
@@ -493,12 +493,12 @@ def test_invalid_pagination_token(self):
493493 result = self .get_success (
494494 self .handler .get_room_hierarchy (self .user , self .space , limit = 7 )
495495 )
496- self .assertIn ("next_token " , result )
496+ self .assertIn ("next_batch " , result )
497497
498498 # Changing the room ID, suggested-only, or max-depth causes an error.
499499 self .get_failure (
500500 self .handler .get_room_hierarchy (
501- self .user , self .room , from_token = result ["next_token " ]
501+ self .user , self .room , from_token = result ["next_batch " ]
502502 ),
503503 SynapseError ,
504504 )
@@ -507,13 +507,13 @@ def test_invalid_pagination_token(self):
507507 self .user ,
508508 self .space ,
509509 suggested_only = True ,
510- from_token = result ["next_token " ],
510+ from_token = result ["next_batch " ],
511511 ),
512512 SynapseError ,
513513 )
514514 self .get_failure (
515515 self .handler .get_room_hierarchy (
516- self .user , self .space , max_depth = 0 , from_token = result ["next_token " ]
516+ self .user , self .space , max_depth = 0 , from_token = result ["next_batch " ]
517517 ),
518518 SynapseError ,
519519 )
0 commit comments