'Test handle nopage correctly works with DEBUG=True'

def test_handle_no_page(self):

    request = self.get_request('/')
    slug = ''
    self.assertRaises(Http404, _handle_no_page, request, slug)
    with self.settings(DEBUG=True):
        request = self.get_request('/en/')
        slug = ''
        response = _handle_no_page(request, slug)
        self.assertEqual(response.status_code, 200)
