Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(26)  |  Call(26)  |  Derive(0)  |  Import(0)

src/d/j/django-oscar-HEAD/tests/functional/checkout/guest_checkout_tests.py   django-oscar(Download)
    def test_redirects_customers_with_empty_basket(self):
        response = self.get(reverse('checkout:index'))
        self.assertRedirectUrlName(response, 'basket:summary')
 
    def test_redirects_customers_with_invalid_basket(self):
 
        response = self.get(reverse('checkout:index'))
        self.assertRedirectUrlName(response, 'basket:summary')
 
 
    def test_redirects_customers_with_empty_basket(self):
        response = self.get(reverse('checkout:shipping-address'))
        self.assertRedirectUrlName(response, 'basket:summary')
 
    def test_redirects_customers_who_have_skipped_guest_form(self):
        self.add_product_to_basket()
        response = self.get(reverse('checkout:shipping-address'))
        self.assertRedirectUrlName(response, 'checkout:index')
 
        response = self.get(reverse('checkout:shipping-address'))
        self.assertRedirectUrlName(response, 'checkout:shipping-method')
 
    def test_redirects_customers_with_invalid_basket(self):

src/d/j/django-oscar-HEAD/tests/functional/checkout/customer_checkout_tests.py   django-oscar(Download)
    def test_redirects_customers_with_empty_basket(self):
        response = self.get(reverse('checkout:index'))
        self.assertRedirectUrlName(response, 'basket:summary')
 
    def test_redirects_customers_to_shipping_address_view(self):
        self.add_product_to_basket()
        response = self.get(reverse('checkout:index'))
        self.assertRedirectUrlName(response, 'checkout:shipping-address')
        form['postcode'] = 'N1 7RR'
        response = form.submit()
        self.assertRedirectUrlName(response, 'checkout:shipping-method')
 
        session_data = self.app.session['checkout_data']
    def test_redirects_when_only_one_shipping_method(self):
        self.add_product_to_basket()
        self.enter_shipping_address()
        response = self.get(reverse('checkout:shipping-method'))
        self.assertRedirectUrlName(response, 'checkout:payment-method')