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
3
Example 1
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())
3
Example 2
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)
0
Example 3
def assertIsNotRedirect(self, response):
self.assertIsOk(response)
self.assertTrue(response.status_code not in (
http_client.FOUND, http_client.MOVED_PERMANENTLY
))