@defer.inlineCallbacks
    def change_membership(self, room, src, targ, membership, tok=None,
                          expect_code=200):
        temp_id = self.auth_user_id
        self.auth_user_id = src

        path = "/rooms/%s/state/m.room.member/%s" % (room, targ)
        if tok:
            path = path + tok % "?access_token=%s"

        data = {
            "membership": membership
        }

        (code, response) = yield self.mock_resource.trigger(
            "PUT", path, json.dumps(data)
        )
        self.assertEquals(expect_code, code, msg=str(response))

        self.auth_user_id = temp_id
dataset/ETHPy150Open matrix-org/synapse/tests/rest/client/v1/utils.py/RestTestCase.change_membership/swapped operands of `%`