'Test the details view'

def test_details_view(self):

    superuser = self.get_superuser()
    self.assertEqual(Page.objects.all().count(), 0)
    with self.login_user_context(superuser):
        response = self.client.get(self.get_pages_root())
        self.assertEqual(response.status_code, 404)
        page = create_page('test    page    1', 'nav_playground.html', 'en')
        page.publish('en')
        response = self.client.get(self.get_pages_root())
        self.assertEqual(response.status_code, 200)
        self.assertTrue(page.publish('en'))
        page2 = create_page('test    page    2', 'nav_playground.html', 'en', parent=page, published=True)
        homepage = Page.objects.get_home()
        self.assertTrue(homepage.get_slug(), 'test-page-1')
        self.assertEqual(page2.get_absolute_url(), '/en/test-page-2/')
        response = self.client.get(page2.get_absolute_url())
        self.assertEqual(response.status_code, 200)
