summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorJonathan de Jong <jonathan@automatia.nl>2023-05-18 18:49:12 +0200
committerGitHub <noreply@github.com>2023-05-18 12:49:12 -0400
commite5b4d93770fe5cfc45f1e769d8cb00a2075d68fa (patch)
tree643c502e29ac64646daad66e04c2bfcd4e025f07 /tests
parentFix olddeps build (#15626) (diff)
downloadsynapse-e5b4d93770fe5cfc45f1e769d8cb00a2075d68fa.tar.xz
Update Mutual Rooms (MSC2666) implementation (#15621)
To track changes in MSC2666:

- The change from `/mutual_rooms/{user_id}` to `/mutual_rooms?user_id={user_id}`.
- The addition of `next_batch_token` (and logic).
- Unstable flag now being `uk.half-shot.msc2666.query_mutual_rooms`.
- The error code when your own user is requested.
Diffstat (limited to 'tests')
-rw-r--r--tests/rest/client/test_mutual_rooms.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/rest/client/test_mutual_rooms.py b/tests/rest/client/test_mutual_rooms.py
index a4327f7ace..22fddbd6d6 100644
--- a/tests/rest/client/test_mutual_rooms.py
+++ b/tests/rest/client/test_mutual_rooms.py
@@ -11,6 +11,8 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+from urllib.parse import quote
+
 from twisted.test.proto_helpers import MemoryReactor
 
 import synapse.rest.admin
@@ -44,8 +46,8 @@ class UserMutualRoomsTest(unittest.HomeserverTestCase):
     def _get_mutual_rooms(self, token: str, other_user: str) -> FakeChannel:
         return self.make_request(
             "GET",
-            "/_matrix/client/unstable/uk.half-shot.msc2666/user/mutual_rooms/%s"
-            % other_user,
+            "/_matrix/client/unstable/uk.half-shot.msc2666/user/mutual_rooms"
+            f"?user_id={quote(other_user)}",
             access_token=token,
         )