def test_pages(self):
        """Make sure that all pages are valid HTML5"""
        settings.LANGUAGE_SECTIONS = ['en']
        user = models.User('user1', 'user1@example.com', 'default')
        user.active = True
        topic = models.Topic('en', 'This is a test topic', 'Foobar', user)
        post1 = models.Post(topic, user, 'meh1')
        post2 = models.Post(topic, user, 'meh2')
        topic.accept_answer(post1)
        session.commit()

        visited_links = set()
        def visit(url):
            url = urljoin(BASE_URL, url).split('#', 1)[0]
            if not url.startswith(BASE_URL) or url in visited_links:
                return
            visited_links.add(url)
            path = url.split('/', 3)[-1]
            response = self.client.get(path, follow_redirects=True)
            content_type = response.headers['Content-Type']
            if content_type.split(';')[0].strip() == 'text/html':
                self.doExternalValidation(url, response.data, content_type)
            for link in html_xpath(response.html, '//html:a[@href]'):
                visit(link.attrib['href'])

        self.login('user1', 'default')
        visit('/')
dataset/ETHPy150Open mitsuhiko/solace/solace/tests/validation.py/ValidatorTestCase.test_pages/original