Skip to content

Commit

Permalink
update types for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
snopoke committed Nov 9, 2023
1 parent 3fccd29 commit ad809c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_form.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dataclasses
from datetime import date, datetime, time
from typing import List

import pytest
from django.forms import fields, modelform_factory
Expand Down Expand Up @@ -27,7 +28,7 @@ def test_form_basics(dataclass_field, form_field):


def test_form_field_classes():
d_class = dataclasses.make_dataclass("DataclassFormTest", [("to", list[str])])
d_class = dataclasses.make_dataclass("DataclassFormTest", [("to", List[str])])
form = modelform_factory(d_class, form=DataclassForm, fields="__all__", field_classes={"to": fields.EmailField})
assert list(form.base_fields) == ["to"]
assert form.base_fields["to"].__class__ == fields.EmailField
Expand Down

0 comments on commit ad809c4

Please sign in to comment.