<commit_before>from django.test import TestCase

from conman.tests.utils import RequestTestCase
from . import factories
from .. import views


class TestPageDetail(RequestTestCase):
    def test_get_object(self):
        """PageDetail displays the page instance passed in the node kwarg."""
        request = self.create_request()
        page = factories.PageFactory.create()

        view = views.PageDetail(request=request, kwargs={'node': page})
        obj = view.get_object()

        self.assertEqual(obj, page)


class TestPageDetailIntegration(TestCase):
    view = views.PageDetail

    def test_get(self):
        """A page's content is rendered at its url."""
        page = factories.PageFactory.create(content='This is a test')
        response = self.client.get(page.url)
        self.assertIn(page.content, response.rendered_content)<commit_msg>Remove unused test class attr<commit_after>from django.test import TestCase

from conman.tests.utils import RequestTestCase
from . import factories
from .. import views


class TestPageDetail(RequestTestCase):
    def test_get_object(self):
        """PageDetail displays the page instance passed in the node kwarg."""
        request = self.create_request()
        page = factories.PageFactory.create()

        view = views.PageDetail(request=request, kwargs={'node': page})
        obj = view.get_object()

        self.assertEqual(obj, page)


class TestPageDetailIntegration(TestCase):
    def test_get(self):
        """A page's content is rendered at its url."""
        page = factories.PageFactory.create(content='This is a test')
        response = self.client.get(page.url)
        self.assertIn(page.content, response.rendered_content)
{'fraction_non_alphanumeric': 0.10064365125804564, 'fraction_numerical': 0.0, 'mean_word_length': 3.453125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2114068', 'n_tokens_mistral': 464, 'n_tokens_neox': 447, 'n_words': 127}