def test_notification_context_send(self):
    queue = Queue()
    nc = NotificationContext(queue)
    method = 'test/test'
    params = {}
    nc.send_notification(method, params)
    self.assertTrue(queue.not_empty)
    out_message = queue.get_nowait()
    self.assertIsInstance(out_message, JSONRPCMessage)
    self.assertEqual(out_message.message_type, JSONRPCMessageType.Notification)
    self.assertIsNone(out_message.message_id)
    self.assertEqual(out_message.message_params, params)
    self.assertEqual(out_message.message_method, method)
def test_notification_context_send(self):
    queue = Queue()
    nc = NotificationContext(queue)
    method = 'test/test'
    params = {}
    nc.send_notification(method, params)
    self.assertTrue(queue.not_empty)
    out_message = queue.get_nowait()
    self.assertIsInstance(out_message, JSONRPCMessage)
    self.assertEqual(out_message.message_type, JSONRPCMessageType.Notification)
    self.assertIsNone(out_message.message_id)
    self.assertEqual(out_message.message_params, params)
    self.assertEqual(out_message.message_method, method)