From 619db3512fd57f72df585d13fb7853500321acc9 Mon Sep 17 00:00:00 2001 From: KShivendu Date: Thu, 7 Sep 2023 15:36:10 +0530 Subject: [PATCH] fix: Failing django2x website tests --- tests/frontendIntegration/django2x/polls/views.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/frontendIntegration/django2x/polls/views.py b/tests/frontendIntegration/django2x/polls/views.py index efba5ee66..7061b85a2 100644 --- a/tests/frontendIntegration/django2x/polls/views.py +++ b/tests/frontendIntegration/django2x/polls/views.py @@ -373,14 +373,11 @@ def login_2_18(request: HttpRequest): {"uid": user_id, "ate": get_timestamp_ms() + 3600000, "up": payload} ) - return JsonResponse( - {}, - headers={ - "st-access-token": legacy_access_token, - "st-refresh-token": legacy_refresh_token, - "front-token": b64encode(front_token.encode()).decode(), - }, - ) + res = JsonResponse({}) + res["st-access-token"] = legacy_access_token + res["st-refresh-token"] = legacy_refresh_token + res["front-token"] = b64encode(front_token.encode()).decode() + return res else: return send_options_api_response()