def setUp(self):
    self.session_inject = {}
    self.context = AdminRequestContext.test_context(self.session_inject)
    self.outbound_message_router = async_mock.CoroutineMock()
    self.request_dict = {'context': self.context, 'outbound_message_router': self.outbound_message_router}
    self.request = async_mock.MagicMock(match_info={'mediation_id': 'test-mediation-id', 'conn_id': 'test-conn-id'}, query={}, json=async_mock.CoroutineMock(return_value={}), __getitem__=(lambda _, k: self.request_dict[k]))
    serialized = {'mediation_id': 'fake_id', 'state': 'granted', 'role': 'server', 'connection_id': 'c3dd00cf-f6a2-4ddf-93d8-49ae74bdacef', 'mediator_terms': [], 'recipient_terms': [], 'routing_keys': ['EXAMPLE_KEY'], 'endpoint': 'http://192.168.1.13:3005', 'created_at': '1234567890'}
    self.mock_record = async_mock.MagicMock(**serialized, serialize=async_mock.MagicMock(return_value=serialized), save=async_mock.CoroutineMock())
def setUp(self):
    self.session_inject = {}
    self.context = AdminRequestContext.test_context(self.session_inject)
    self.outbound_message_router = async_mock.CoroutineMock()
    self.request_dict = {'context': self.context, 'outbound_message_router': self.outbound_message_router}
    self.request = async_mock.MagicMock(match_info={'mediation_id': 'test-mediation-id', 'conn_id': 'test-conn-id'}, query={}, json=async_mock.CoroutineMock(return_value={}), __getitem__=(lambda _, k: self.request_dict[k]))
    serialized = {'mediation_id': 'fake_id', 'state': 'granted', 'role': 'server', 'connection_id': 'c3dd00cf-f6a2-4ddf-93d8-49ae74bdacef', 'mediator_terms': [], 'recipient_terms': [], 'routing_keys': ['EXAMPLE_KEY'], 'endpoint': 'http://192.168.1.13:3005', 'created_at': '1234567890'}
    self.mock_record = async_mock.MagicMock(**serialized, serialize=async_mock.MagicMock(return_value=serialized), save=async_mock.CoroutineMock())