if (
        setting.app_environment == Environment.TESTING
        and not current_app.config['TESTING']
    ):
        current_app.config.from_object('config.TestingConfig')