Skip to content

Commit 2dcdf4a

Browse files
committed
Remove param in test
1 parent 284b390 commit 2dcdf4a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

authentication/views.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from django.contrib.auth import logout
66
from django.shortcuts import redirect
7-
from django.utils.http import url_has_allowed_host_and_scheme, urlencode
7+
from django.utils.http import url_has_allowed_host_and_scheme
88
from django.views import View
99

1010
from main import settings
@@ -80,8 +80,7 @@ def get(
8080
not profile.completed_onboarding
8181
and request.GET.get("skip_onboarding", "0") == "0"
8282
):
83-
params = urlencode({"next": redirect_url})
84-
redirect_url = f"{settings.MITOL_NEW_USER_LOGIN_URL}?{params}"
83+
redirect_url = settings.MITOL_NEW_USER_LOGIN_URL
8584
profile.completed_onboarding = True
8685
profile.save()
8786
return redirect(redirect_url)

authentication/views_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,14 @@ def test_custom_login_view_authenticated_user_with_onboarding(mocker):
120120
request.user = MagicMock(is_anonymous=False)
121121
request.user.profile = MagicMock(completed_onboarding=False)
122122
mocker.patch("authentication.views.get_redirect_url", return_value="/dashboard")
123-
mocker.patch("authentication.views.urlencode", return_value="next=/dashboard")
124123
mocker.patch(
125124
"authentication.views.settings.MITOL_NEW_USER_LOGIN_URL", "/onboarding"
126125
)
127126

128127
response = CustomLoginView().get(request)
129128

130129
assert response.status_code == 302
131-
assert response.url == "/onboarding?next=/dashboard"
130+
assert response.url == "/onboarding"
132131

133132

134133
def test_custom_login_view_authenticated_user_skip_onboarding(mocker):

0 commit comments

Comments
 (0)