@@ -3834,7 +3834,7 @@ class RequiredStateChangesTestParameters:
38343834 expected_with_state_deltas : _RequiredStateChangesReturn
38353835 expected_without_state_deltas : _RequiredStateChangesReturn
38363836
3837- previously_returned_user_state : AbstractSet [str ] = frozenset ()
3837+ previously_returned_user_ids : AbstractSet [str ] = frozenset ()
38383838 lazy_load_user_ids : AbstractSet [str ] = frozenset ()
38393839
38403840
@@ -4370,7 +4370,7 @@ class RequiredStateChangesTestCase(unittest.TestCase):
43704370 RequiredStateChangesTestParameters (
43714371 previous_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
43724372 request_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
4373- previously_returned_user_state = {"@user2:test" , "@user3:test" },
4373+ previously_returned_user_ids = {"@user2:test" , "@user3:test" },
43744374 lazy_load_user_ids = set (),
43754375 state_deltas = {(EventTypes .Member , "@user2:test" ): "$event_id" },
43764376 expected_with_state_deltas = _RequiredStateChangesReturn (
@@ -4415,7 +4415,7 @@ class RequiredStateChangesTestCase(unittest.TestCase):
44154415 RequiredStateChangesTestParameters (
44164416 previous_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
44174417 request_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
4418- previously_returned_user_state = {"@user2:test" , "@user3:test" },
4418+ previously_returned_user_ids = {"@user2:test" , "@user3:test" },
44194419 lazy_load_user_ids = {"@user4:test" },
44204420 state_deltas = {(EventTypes .Member , "@user2:test" ): "$event_id" },
44214421 expected_with_state_deltas = _RequiredStateChangesReturn (
@@ -4457,7 +4457,7 @@ class RequiredStateChangesTestCase(unittest.TestCase):
44574457 EventTypes .Member : {"@user2:test" , "@user3:test" }
44584458 },
44594459 request_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
4460- previously_returned_user_state = frozenset (),
4460+ previously_returned_user_ids = frozenset (),
44614461 lazy_load_user_ids = {"@user3:test" },
44624462 state_deltas = {(EventTypes .Member , "@user2:test" ): "$event_id" },
44634463 expected_with_state_deltas = _RequiredStateChangesReturn (
@@ -4501,7 +4501,7 @@ class RequiredStateChangesTestCase(unittest.TestCase):
45014501 RequiredStateChangesTestParameters (
45024502 previous_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
45034503 request_required_state_map = {},
4504- previously_returned_user_state = {"@user2:test" , "@user3:test" },
4504+ previously_returned_user_ids = {"@user2:test" , "@user3:test" },
45054505 lazy_load_user_ids = set (),
45064506 state_deltas = {(EventTypes .Member , "@user2:test" ): "$event_id" },
45074507 expected_with_state_deltas = _RequiredStateChangesReturn (
@@ -4549,7 +4549,7 @@ class RequiredStateChangesTestCase(unittest.TestCase):
45494549 RequiredStateChangesTestParameters (
45504550 previous_required_state_map = {EventTypes .Member : {StateValues .LAZY }},
45514551 request_required_state_map = {EventTypes .Member : {"@user4:test" }},
4552- previously_returned_user_state = {"@user2:test" , "@user3:test" },
4552+ previously_returned_user_ids = {"@user2:test" , "@user3:test" },
45534553 lazy_load_user_ids = {"@user4:test" },
45544554 state_deltas = {(EventTypes .Member , "@user2:test" ): "$event_id" },
45554555 expected_with_state_deltas = _RequiredStateChangesReturn (
@@ -4720,19 +4720,12 @@ def test_xxx(
47204720 _test_description : str ,
47214721 test_parameters : RequiredStateChangesTestParameters ,
47224722 ) -> None :
4723- # `_required_state_changes` expects this to be a map from user ID to
4724- # timestamp, so let's convert it into one by using a dummy timestamp
4725- # value
4726- previously_returned_user_state = dict .fromkeys (
4727- test_parameters .previously_returned_user_state , 1234
4728- )
4729-
47304723 # Without `state_deltas`
47314724 state_changes = _required_state_changes (
47324725 user_id = "@user:test" ,
47334726 prev_required_state_map = test_parameters .previous_required_state_map ,
47344727 request_required_state_map = test_parameters .request_required_state_map ,
4735- previously_returned_user_state = previously_returned_user_state ,
4728+ previously_returned_user_ids = test_parameters . previously_returned_user_ids ,
47364729 lazy_load_user_ids = test_parameters .lazy_load_user_ids ,
47374730 state_deltas = {},
47384731 )
@@ -4763,7 +4756,7 @@ def test_xxx(
47634756 user_id = "@user:test" ,
47644757 prev_required_state_map = test_parameters .previous_required_state_map ,
47654758 request_required_state_map = test_parameters .request_required_state_map ,
4766- previously_returned_user_state = previously_returned_user_state ,
4759+ previously_returned_user_ids = test_parameters . previously_returned_user_ids ,
47674760 lazy_load_user_ids = test_parameters .lazy_load_user_ids ,
47684761 state_deltas = test_parameters .state_deltas ,
47694762 )
@@ -4827,7 +4820,7 @@ def test_limit_retained_previous_state_keys(
48274820 user_id = "@user:test" ,
48284821 prev_required_state_map = previous_required_state_map ,
48294822 request_required_state_map = request_required_state_map ,
4830- previously_returned_user_state = {} ,
4823+ previously_returned_user_ids = frozenset () ,
48314824 lazy_load_user_ids = frozenset (),
48324825 state_deltas = {},
48334826 )
@@ -4900,7 +4893,7 @@ def test_request_more_state_keys_than_remember_limit(self) -> None:
49004893 user_id = "@user:test" ,
49014894 prev_required_state_map = previous_required_state_map ,
49024895 request_required_state_map = request_required_state_map ,
4903- previously_returned_user_state = {} ,
4896+ previously_returned_user_ids = frozenset () ,
49044897 lazy_load_user_ids = frozenset (),
49054898 state_deltas = {},
49064899 )
0 commit comments