from unittest import mock
import pytest
from main.forms import CommentForm, ContactForm
from main.middleware import client_ip_hash, is_bot
from main.models import is_public_http_url
from main.signals import build_telegram_text
from main.templatetags.custom_filters import render_tech_badge
def test_comment_form_strips_scripts_and_keeps_allowed_tags():
form = CommentForm(data={'content': 'жирный https://example.com'})
assert form.is_valid()
content = form.cleaned_data['content']
assert '')
assert '