mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-25 10:33:50 +02:00
Unit test skeleton
This commit is contained in:
parent
4e4d0d0f1e
commit
4c4d5d758e
5 changed files with 140 additions and 7 deletions
|
@ -154,7 +154,7 @@ class FinishProfileSetupView(UserProfileView):
|
|||
"""
|
||||
|
||||
# Update redirect type based on the query parameter if present
|
||||
redirect_type = request.GET.get("redirect", self.RedirectType.BACK_TO_SELF)
|
||||
redirect_type = request.GET.get("redirect", str(self.RedirectType.BACK_TO_SELF))
|
||||
|
||||
all_redirect_types = [r.value for r in self.RedirectType]
|
||||
if redirect_type in all_redirect_types:
|
||||
|
@ -240,6 +240,7 @@ class FinishProfileSetupView(UserProfileView):
|
|||
# We only allow this session value to use viewnames,
|
||||
# because this restricts what can be redirected to.
|
||||
desired_view = self.session["redirect_viewname"]
|
||||
self.session.pop("redirect_viewname")
|
||||
base_url = reverse(desired_view)
|
||||
else:
|
||||
base_url = reverse("home")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue