Revert "Leave out optional keys from /sync (#9919)" (#9940)

This reverts commit e9eb3549d3.
This commit is contained in:
Erik Johnston 2021-05-06 15:06:35 +01:00 committed by GitHub
parent a8803e2b6e
commit eba431c539
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 51 deletions

View file

@ -37,7 +37,35 @@ class FilterTestCase(unittest.HomeserverTestCase):
channel = self.make_request("GET", "/sync")
self.assertEqual(channel.code, 200)
self.assertIn("next_batch", channel.json_body)
self.assertTrue(
{
"next_batch",
"rooms",
"presence",
"account_data",
"to_device",
"device_lists",
}.issubset(set(channel.json_body.keys()))
)
def test_sync_presence_disabled(self):
"""
When presence is disabled, the key does not appear in /sync.
"""
self.hs.config.use_presence = False
channel = self.make_request("GET", "/sync")
self.assertEqual(channel.code, 200)
self.assertTrue(
{
"next_batch",
"rooms",
"account_data",
"to_device",
"device_lists",
}.issubset(set(channel.json_body.keys()))
)
class SyncFilterTestCase(unittest.HomeserverTestCase):