django.utils.six.moves.http_client.OK

Here are the examples of the python api django.utils.six.moves.http_client.OK taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

5 Examples 7

Example 1

Project: django-oscar
Source File: catalogue_tests.py
View license
    def test_child_to_parent_redirect(self):
        parent_product = create_product(structure='parent')
        kwargs = {'product_slug': parent_product.slug,
                  'pk': parent_product.id}
        parent_product_url = reverse('catalogue:detail', kwargs=kwargs)

        child = create_product(
            title="Variant 1", structure='child', parent=parent_product)
        kwargs = {'product_slug': child.slug,
                  'pk': child.id}
        child_url = reverse('catalogue:detail', kwargs=kwargs)

        response = self.app.get(parent_product_url)
        self.assertEqual(http_client.OK, response.status_code)

        response = self.app.get(child_url)
        self.assertEqual(http_client.MOVED_PERMANENTLY, response.status_code)

Example 2

Project: django-oscar
Source File: order_status_tests.py
View license
    def test_can_see_order_status(self):
        order = create_order()
        path = reverse('customer:anon-order',
                       kwargs={'order_number': order.number,
                               'hash': order.verification_hash()})
        response = self.app.get(path)
        self.assertEqual(http_client.OK, response.status_code)

Example 3

Project: django-oscar
Source File: testcases.py
View license
    def assertIsOk(self, response):
        self.assertEqual(http_client.OK, response.status_code)

Example 4

Project: django-oscar
Source File: basket_tests.py
View license
    def test_view_does_not_error(self):
        self.assertEqual(http_client.OK, self.response.status_code)

Example 5

Project: django-oscar
Source File: catalogue_tests.py
View license
    def test_browsing_works(self):
        correct_url = self.category.get_absolute_url()
        response = self.app.get(correct_url)
        self.assertEqual(http_client.OK, response.status_code)