async def test_clear_default_mediator(self):
    self.request.query = {}
    self.context.session = async_mock.CoroutineMock()
    with async_mock.patch.object(test_module.MediationManager, 'get_default_mediator', async_mock.CoroutineMock(return_value=self.mock_record)) as mock_mgr_get_default_record, async_mock.patch.object(test_module.MediationManager, 'clear_default_mediator', async_mock.CoroutineMock()) as mock_mgr_clear_default_record_by_id, async_mock.patch.object(test_module.web, 'json_response') as json_response:
        (await test_module.clear_default_mediator(self.request))
        json_response.assert_called_once_with(self.mock_record.serialize.return_value, status=201)
async def test_clear_default_mediator(self):
    self.request.query = {}
    self.context.session = async_mock.CoroutineMock()
    with async_mock.patch.object(test_module.MediationManager, 'get_default_mediator', async_mock.CoroutineMock(return_value=self.mock_record)) as mock_mgr_get_default_record, async_mock.patch.object(test_module.MediationManager, 'clear_default_mediator', async_mock.CoroutineMock()) as mock_mgr_clear_default_record_by_id, async_mock.patch.object(test_module.web, 'json_response') as json_response:
        (await test_module.clear_default_mediator(self.request))
        json_response.assert_called_once_with(self.mock_record.serialize.return_value, status=201)