<commit_before># encoding: utf-8
import json

import pytest

from form_data.models import FormData


def test_convert_to_dict(sample_dict):
    data = json.dumps(sample_dict)
    converted_data = FormData.convert_to_dict(data)
    assert type(converted_data) == dict
    data = {k: json.dumps(v) for k, v in sample_dict.items()}
    converted_data = FormData.convert_to_dict(data)
    assert type(converted_data) == dict


def test_convert_values_to_string(sample_dict):
    converted_data = FormData.convert_values_to_string(sample_dict)
    assert all(type(v) == str for _, v in converted_data.items())


@pytest.mark.django_db
def test_setting(model, model_data):
    """Test for correct behavior of signal receiver

    The test checks if rendered html is set in post_save signal
    receiver method.
    """
    assert model.html != model_data['form']['html']<commit_msg>Removed tests for removed helper methods<commit_after># encoding: utf-8
import pytest


@pytest.mark.django_db
def test_setting(model, model_data):
    """Test for correct behavior of signal receiver

    The test checks if rendered html is set in post_save signal
    receiver method.
    """
    assert model.html != model_data['form']['html']
{'fraction_non_alphanumeric': 0.09336609336609336, 'fraction_numerical': 0.001638001638001638, 'mean_word_length': 4.504504504504505, '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': '2216237', 'n_tokens_mistral': 376, 'n_tokens_neox': 379, 'n_words': 107}