Unit test skeleton

This commit is contained in:
zandercymatics 2024-05-20 16:08:51 -06:00
parent 4e4d0d0f1e
commit 4c4d5d758e
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 140 additions and 7 deletions

View file

@ -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")