def test_flatten_nested_listfield_and_formfield_inheritance(self):
        class NestedForm(Form):
            b = TextField()

        class SpecialNestedField(FormField):
            def __init__(self, *args, **kwargs):
                super(SpecialNestedField, self).__init__(
                    NestedForm,
                    *args,
                    **kwargs
                )

        class SpecialField(FieldList):
            def __init__(self, *args, **kwargs):
                super(SpecialField, self).__init__(
                    SpecialNestedField(),
                    *args,
                    **kwargs
                )

        class MyForm(Form):
            a = SpecialField()

        assert flatten_json(MyForm, {'a': [{'b': 1}, {'b': 2}, {'b': 3}]}) == {
            'a-0-b': 1,
            'a-1-b': 2,
            'a-2-b': 3
        }
dataset/ETHPy150Open kvesteri/wtforms-json/tests/test_json_decoder.py/TestJsonDecoder.test_flatten_nested_listfield_and_formfield_inheritance/original