Skip to content

Commit 831dd43

Browse files
committed
Add unit tests
1 parent d12b09f commit 831dd43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/forms_tests_/test_array.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ def test_model_field_formfield_max_size(self):
134134
self.assertIsInstance(form_field, SimpleArrayField)
135135
self.assertEqual(form_field.max_length, 4)
136136

137+
def test_model_field_formfield_size(self):
138+
model_field = ArrayField(models.CharField(max_length=27), size=4)
139+
form_field = model_field.formfield()
140+
self.assertIsInstance(form_field, SimpleArrayField)
141+
self.assertEqual(form_field.size, 4)
142+
137143
def test_model_field_choices(self):
138144
model_field = ArrayField(models.IntegerField(choices=((1, "A"), (2, "B"))))
139145
form_field = model_field.formfield()

0 commit comments

Comments
 (0)