|
|
@@ -2,7 +2,6 @@ import pytest
|
|
|
import factory
|
|
|
from collections import namedtuple
|
|
|
from wtforms import Form, fields
|
|
|
-from werkzeug.datastructures import ImmutableMultiDict
|
|
|
from pydantic_form import PydanticForm
|
|
|
from pydantic import BaseModel, ValidationError
|
|
|
from pydantic.types import StrictStr
|
|
|
@@ -226,7 +225,7 @@ class NestedWTForm(Form):
|
|
|
_schema = NestedSchema
|
|
|
|
|
|
integer = fields.IntegerField()
|
|
|
- nested = fields.FormField(form_class=SimpleForm)
|
|
|
+ nested = fields.FormField(SimpleForm)
|
|
|
|
|
|
|
|
|
class NestedForm(NestedWTForm, PydanticForm):
|
|
|
@@ -312,7 +311,7 @@ class NestedListWTForm(Form):
|
|
|
_schema = NestedListSchema
|
|
|
|
|
|
integer = fields.IntegerField()
|
|
|
- nested_list = fields.FieldList(fields.FormField(form_class=SimpleForm), min_entries=2)
|
|
|
+ nested_list = fields.FieldList(fields.FormField(SimpleForm), min_entries=2)
|
|
|
|
|
|
|
|
|
class NestedListForm(NestedListWTForm, PydanticForm):
|
|
|
@@ -414,12 +413,12 @@ class DoubleNestedWTForm(Form):
|
|
|
_schema = DoubleNestedSchema
|
|
|
|
|
|
integer = fields.IntegerField()
|
|
|
- double_nested = fields.FormField(form_class=NestedWTForm)
|
|
|
+ double_nested = fields.FormField(NestedWTForm)
|
|
|
|
|
|
|
|
|
class DoubleNestedForm(DoubleNestedWTForm, PydanticForm):
|
|
|
_schema = DoubleNestedSchema
|
|
|
- double_nested = fields.FormField(form_class=NestedForm)
|
|
|
+ double_nested = fields.FormField(NestedForm)
|
|
|
|
|
|
|
|
|
class DoubleNestedDataFactory(factory.Factory):
|