From 6606ac1d07eab5e753e6d2c130372502d2e0ad10 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 23 May 2024 09:23:02 -0500 Subject: [PATCH] Add docstring for parametized attributes See https://github.com/element-hq/synapse/pull/17167#discussion_r1611301044 --- tests/rest/client/test_sendtodevice.py | 4 ++++ tests/rest/client/test_sync.py | 24 +++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/rest/client/test_sendtodevice.py b/tests/rest/client/test_sendtodevice.py index a5eefaf958..7718e323d0 100644 --- a/tests/rest/client/test_sendtodevice.py +++ b/tests/rest/client/test_sendtodevice.py @@ -46,6 +46,10 @@ from tests.unittest import HomeserverTestCase, override_config class SendToDeviceTestCase(HomeserverTestCase): """ Test `/sendToDevice` will deliver messages across to people receiving them over `/sync`. + + Attributes: + sync_endpoint (str): The endpoint under test to use for syncing. + experimental_features (JsonDict): The experimental features homeserver config to use. """ servlets = [ diff --git a/tests/rest/client/test_sync.py b/tests/rest/client/test_sync.py index ab9b16a0f8..a09d714e40 100644 --- a/tests/rest/client/test_sync.py +++ b/tests/rest/client/test_sync.py @@ -700,7 +700,13 @@ class SyncCacheTestCase(unittest.HomeserverTestCase): ], ) class DeviceListSyncTestCase(unittest.HomeserverTestCase): - """Tests regarding device list (`device_lists`) changes.""" + """ + Tests regarding device list (`device_lists`) changes. + + Attributes: + sync_endpoint (str): The endpoint under test to use for syncing. + experimental_features (JsonDict): The experimental features homeserver config to use. + """ servlets = [ synapse.rest.admin.register_servlets, @@ -907,7 +913,13 @@ class DeviceListSyncTestCase(unittest.HomeserverTestCase): ], ) class DeviceOneTimeKeysSyncTestCase(unittest.HomeserverTestCase): - """Tests regarding device one time keys (`device_one_time_keys_count`) changes.""" + """ + Tests regarding device one time keys (`device_one_time_keys_count`) changes. + + Attributes: + sync_endpoint (str): The endpoint under test to use for syncing. + experimental_features (JsonDict): The experimental features homeserver config to use. + """ servlets = [ synapse.rest.admin.register_servlets, @@ -1013,7 +1025,13 @@ class DeviceOneTimeKeysSyncTestCase(unittest.HomeserverTestCase): ], ) class DeviceUnusedFallbackKeySyncTestCase(unittest.HomeserverTestCase): - """Tests regarding device one time keys (`device_unused_fallback_key_types`) changes.""" + """ + Tests regarding device one time keys (`device_unused_fallback_key_types`) changes. + + Attributes: + sync_endpoint (str): The endpoint under test to use for syncing. + experimental_features (JsonDict): The experimental features homeserver config to use. + """ servlets = [ synapse.rest.admin.register_servlets,