django.utils.six.moves.http_client.FOUND

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

3 Examples 7

Example 1

Project: django-oscar
Source File: testcases.py
View license
    def assertIsRedirect(self, response, expected_url=None):
        self.assertTrue(response.status_code in (
            http_client.FOUND, http_client.MOVED_PERMANENTLY))
        if expected_url:
            location = URL.from_string(response['Location'])
            self.assertEqual(expected_url, location.path())

Example 2

Project: django-oscar
Source File: order_tests.py
View license
    def test_redirects_to_detail_page(self):
        order = create_order()
        page = self.get(reverse('dashboard:order-list'))
        form = page.forms['search_form']
        form['order_number'] = order.number
        response = form.submit()
        self.assertEqual(http_client.FOUND, response.status_code)

Example 3

Project: django-oscar
Source File: testcases.py
View license
    def assertIsNotRedirect(self, response):
        self.assertIsOk(response)
        self.assertTrue(response.status_code not in (
            http_client.FOUND, http_client.MOVED_PERMANENTLY
        ))