def test_set_notification_handler(self):
    params = IncomingMessageConfiguration('test/test', int)
    handler = mock.MagicMock()
    server = JSONRPCServer(None, None)
    server.set_notification_handler(params, handler)
    self.assertTrue((params.method in server._notification_handlers))
    self.assertIsNotNone(server._notification_handlers[params.method])
    self.assertIs(server._notification_handlers[params.method].class_, int)
    self.assertIs(server._notification_handlers[params.method].handler, handler)
def test_set_notification_handler(self):
    params = IncomingMessageConfiguration('test/test', int)
    handler = mock.MagicMock()
    server = JSONRPCServer(None, None)
    server.set_notification_handler(params, handler)
    self.assertTrue((params.method in server._notification_handlers))
    self.assertIsNotNone(server._notification_handlers[params.method])
    self.assertIs(server._notification_handlers[params.method].class_, int)
    self.assertIs(server._notification_handlers[params.method].handler, handler)