소스 검색

Modify assert technique so test passes

Future tasks is to dig into self.assertRedirectsTo wouldn't work with the test
as it stands
master
Pete Graham 9 년 전
부모
커밋
d5d0c4059e
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      tests/functional/checkout/guest_checkout_tests.py

+ 3
- 1
tests/functional/checkout/guest_checkout_tests.py 파일 보기

@@ -356,7 +356,9 @@ class TestPaymentDetailsView(CheckoutMixin, WebTestCase):
356 356
         mock_method.side_effect = e
357 357
         preview = self.ready_to_place_an_order(is_guest=True)
358 358
         bank_redirect = preview.forms['place_order_form'].submit()
359
-        assert bank_redirect.location == bank_url
359
+
360
+        assert bank_redirect.status_code == 302
361
+        assert bank_redirect.url == bank_url
360 362
 
361 363
     @mock.patch('oscar.apps.checkout.views.PaymentDetailsView.handle_payment')
362 364
     def test_handles_anticipated_payments_errors_gracefully(self, mock_method):

Loading…
취소
저장