Browse Source

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 years ago
parent
commit
d5d0c4059e
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      tests/functional/checkout/guest_checkout_tests.py

+ 3
- 1
tests/functional/checkout/guest_checkout_tests.py View File

@@ -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…
Cancel
Save