diff options
author | David Robertson <davidr@element.io> | 2022-01-07 16:43:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-07 16:43:21 +0000 |
commit | 2bb4bd126946df46aacf6849f0acb01e78f7d807 (patch) | |
tree | 78feea3ac1e0e7d0977c55bf1730589d227d9072 /tests/rest/client | |
parent | Merge branch 'release-v1.50' into develop (diff) | |
download | synapse-2bb4bd126946df46aacf6849f0acb01e78f7d807.tar.xz |
Test that bans win a join against a race when computing `/sync` response (#11701)
Diffstat (limited to 'tests/rest/client')
-rw-r--r-- | tests/rest/client/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rest/client/utils.py b/tests/rest/client/utils.py index 1af5e5cee5..8424383580 100644 --- a/tests/rest/client/utils.py +++ b/tests/rest/client/utils.py @@ -196,6 +196,16 @@ class RestHelper: expect_code=expect_code, ) + def ban(self, room: str, src: str, targ: str, **kwargs: object): + """A convenience helper: `change_membership` with `membership` preset to "ban".""" + self.change_membership( + room=room, + src=src, + targ=targ, + membership=Membership.BAN, + **kwargs, + ) + def change_membership( self, room: str, |