async def test_mediation_request_grant_role_client_x(self):
    self.mock_record.role = MediationRecord.ROLE_CLIENT
    with async_mock.patch.object(test_module.MediationRecord, 'retrieve_by_id', async_mock.CoroutineMock(return_value=self.mock_record)), self.assertRaises(test_module.web.HTTPBadRequest):
        (await test_module.mediation_request_grant(self.request))
async def test_mediation_request_grant_role_client_x(self):
    self.mock_record.role = MediationRecord.ROLE_CLIENT
    with async_mock.patch.object(test_module.MediationRecord, 'retrieve_by_id', async_mock.CoroutineMock(return_value=self.mock_record)), self.assertRaises(test_module.web.HTTPBadRequest):
        (await test_module.mediation_request_grant(self.request))