Made a few adjustments to test the beta redirect:

- Explicitly return the redirect
- Change the redirect to be a 302 instead of 301
- Adjusted the test client to allow sub domains
- Added the remaining tests

A big thank you to @A-Shumway42 for getting this work underway!

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2023-09-18 15:59:28 -04:00
parent 15123f06f9
commit d02d2de9dc
3 changed files with 27 additions and 5 deletions

View File

@@ -344,7 +344,7 @@ def redirect_notify_to_beta():
and "beta.notify.gov" not in request.url
):
url_to_beta = create_beta_url(request.url)
redirect(url_to_beta, 301)
return redirect(url_to_beta, 302)
def load_service_before_request():