@defer.inlineCallbacks
    def send(self, room_id, body=None, txn_id=None, tok=None,
             expect_code=200):
        if txn_id is None:
            txn_id = "m%s" % (str(time.time()))
        if body is None:
            body = "body_text_here"

        path = "/rooms/%s/send/m.room.message/%s" % (room_id, txn_id)
        content = '{"msgtype":"m.text","body":"%s"}' % body
        if tok:
            path = path + tok % "?access_token=%s"

        (code, response) = yield self.mock_resource.trigger("PUT", path, content)
        self.assertEquals(expect_code, code, msg=str(response))
dataset/ETHPy150Open matrix-org/synapse/tests/rest/client/v1/utils.py/RestTestCase.send/swapped operands of `%`