<commit_before>from django.test import TestCase
from fluent_contents.tests.factories import create_content_item
from fluent_contents.tests.utils import render_content_items
from fluentcms_cookielaw.models import CookieLawItem


class CookieLawTests(TestCase):
    """
    Testing private notes
    """

    def test_rendering(self):
        """
        Test the standard button
        """
        item = create_content_item(CookieLawItem, text="Do you like cookies?", button_text="Jummie!")
        output = render_content_items([item])

        self.assertHTMLEqual(output.html,
                             '''<div id="cookielaw-banner">
                                    <div class="container">
                                        <a class="btn" href="javascript:Cookielaw.accept();">Jummie!</a>
                                        Do you like cookies?
                                    </div>
                                </div>''')
        self.assertHTMLEqual(output.media, '<script type="text/javascript" src="/static/fluentcms_cookielaw/js/cookielaw.js"></script>')<commit_msg>Fix unit test<commit_after>from django.test import TestCase
from fluent_contents.tests.factories import create_content_item
from fluent_contents.tests.utils import render_content_items
from fluentcms_cookielaw.models import CookieLawItem


class CookieLawTests(TestCase):
    """
    Testing private notes
    """

    def test_rendering(self):
        """
        Test the standard button
        """
        item = create_content_item(CookieLawItem, text="Do you like cookies?", button_text="Jummie!")
        output = render_content_items([item])

        self.assertHTMLEqual(output.html,
                             '''<div id="cookielaw-banner">
                                    <div class="container">
                                        <a class="btn" href="javascript:Cookielaw.accept();">Jummie!</a>
                                        Do you like cookies?
                                    </div>
                                </div>''')
        self.assertHTMLEqual(str(output.media), '<script type="text/javascript" src="/static/fluentcms_cookielaw/js/cookielaw.js"></script>')
{'fraction_non_alphanumeric': 0.10512007249660173, 'fraction_numerical': 0.0, 'mean_word_length': 1.9717362045760431, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6483986', 'n_tokens_mistral': 583, 'n_tokens_neox': 554, 'n_words': 109}