diff options
author | Shay <hillerys@element.io> | 2023-08-08 12:04:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-08 12:04:46 -0700 |
commit | 0328b56468fe12c4d86ef636b60964527a510160 (patch) | |
tree | 2cff86a1e4518c90f234d4010419c049082a147f /tests/handlers | |
parent | Fixup changelog (diff) | |
download | synapse-0328b56468fe12c4d86ef636b60964527a510160.tar.xz |
Support MSC3814: Dehydrated Devices Part 2 (#16010)
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_device.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/handlers/test_device.py b/tests/handlers/test_device.py index 647ee09279..e1e58fa6e6 100644 --- a/tests/handlers/test_device.py +++ b/tests/handlers/test_device.py @@ -566,15 +566,16 @@ class DehydrationTestCase(unittest.HomeserverTestCase): self.assertEqual(len(res["events"]), 1) self.assertEqual(res["events"][0]["content"]["body"], "foo") - # Fetch the message of the dehydrated device again, which should return nothing - # and delete the old messages + # Fetch the message of the dehydrated device again, which should return + # the same message as it has not been deleted res = self.get_success( self.message_handler.get_events_for_dehydrated_device( requester=requester, device_id=stored_dehydrated_device_id, - since_token=res["next_batch"], + since_token=None, limit=10, ) ) self.assertTrue(len(res["next_batch"]) > 1) - self.assertEqual(len(res["events"]), 0) + self.assertEqual(len(res["events"]), 1) + self.assertEqual(res["events"][0]["content"]["body"], "foo") |