Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/testapp/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
import types
from os import environ

from flask import Flask
from flask import request

import user_profile_service
from optimizely import logger
from optimizely import optimizely
from flask import CSRFProtect, Flask, request

from optimizely import logger, optimizely
from optimizely.helpers import enums

app = Flask(__name__)
# Initialize CSRF protection
csrf = CSRFProtect(app)
Copy link

Copilot AI Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling CSRF protection in the test application may cause tests to fail if CSRF tokens are not provided. Consider updating your test configuration or request simulation to correctly handle CSRF tokens.

Copilot uses AI. Check for mistakes.

datafile = open('datafile.json', 'r')
datafile_content = datafile.read()
Expand Down Expand Up @@ -118,7 +118,7 @@ def before_request():

@app.after_request
def after_request(response):
global optimizely_instance
global optimizely_instance # noqa: F824
global listener_return_maps

optimizely_instance.notification_center.clear_all_notifications()
Expand Down