<commit_before>from django.test import TestCase

from converters import converter_options, CONVERTER_CHOICES
from rest_api.serializers import ConverterOptionsSerializer


class OutputFormatTest(TestCase):
    def test_all_attributes_are_present_in_serializer(self):
        serialized = ConverterOptionsSerializer(converter_options)
        self.assertDictEqual(serialized.data, converter_options.__dict__)

    def test_all_attributes_are_present_in_choices_dict(self):
        self.assertEqual(converter_options.__dict__.keys(), CONVERTER_CHOICES.keys())<commit_msg>follow test naming a bit better<commit_after>from django.test import TestCase

from converters import converter_options, CONVERTER_CHOICES
from rest_api.serializers import ConverterOptionsSerializer


class OutputFormatTest(TestCase):
    def test_serializer_all_attributes_are_present(self):
        serialized = ConverterOptionsSerializer(converter_options)
        self.assertDictEqual(serialized.data, converter_options.__dict__)

    def test_choices_dict_keys_all_attribute_are_present(self):
        self.assertEqual(converter_options.__dict__.keys(), CONVERTER_CHOICES.keys())
{'fraction_non_alphanumeric': 0.06076388888888889, 'fraction_numerical': 0.0, 'mean_word_length': 6.897260273972603, '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': '805131', 'n_tokens_mistral': 321, 'n_tokens_neox': 309, 'n_words': 54}