def init_app(self, app, config_prefix=None):
        # Normalize the prefix and add this instance to app.extensions.
        config_prefix = (config_prefix or 'REDIS').rstrip('_').upper()
        if not hasattr(app, 'extensions'):
            app.extensions = dict()
        if config_prefix.lower() in app.extensions:
            raise ValueError('Already registered config prefix {0!r}.'.format(config_prefix))
        app.extensions[config_prefix.lower()] = _RedisState(self, app)

        # Read config.
        args = read_config(app.config, config_prefix)

        # Instantiate StrictRedis.
        super(Redis, self).__init__(**args)  # Initialize fully.
Test that users cannot message themselves.
dataset/ETHPy150Open Robpol86/Flask-Redis-Helper/flask_redis.py/Redis.init_app--crossover with--dataset/ETHPy150Open ofa/connect/open_connect/connectmessages/tests/test_views.py/DirectMessageCreateViewTest.test_user_cannot_message_self