diff --git a/make_post_sell/tests/test_functional.py b/make_post_sell/tests/test_functional.py index 434784a..93f626f 100644 --- a/make_post_sell/tests/test_functional.py +++ b/make_post_sell/tests/test_functional.py @@ -560,9 +560,11 @@ class AuthenticatedFunctionalTests(FunctionalTests): "csrf_token": csrf_token, # Include CSRF token as a form value. }, ) - res_csrf_checkout = res_csrf_checkout.follow().follow() + # Follow any redirects until we get a 200 OK response + while res_csrf_checkout.status_int in (301, 302, 303, 307, 308): + res_csrf_checkout = res_csrf_checkout.follow() self.assertIn( - "Please enter your payment information.", res_csrf_checkout.body.decode() + "Please confirm your order.", res_csrf_checkout.body.decode() ) def test_cart_checkout_logic_with_none_stripe_user_shop(self):