Beispiel #1
0
 def test_DictCharField_sets_default_value_for_subfields(self):
     default_value = factory.make_name('default_value')
     multi_field = DictCharField(
         [('field_a', forms.CharField(
             label='Field a', initial=default_value))],
         required=False)
     self.assertEquals(
         default_value, multi_field.clean_sub_fields('')['field_a'])
Beispiel #2
0
 def test_DictCharField_sets_default_value_for_subfields(self):
     default_value = factory.make_name("default_value")
     multi_field = DictCharField(
         [(
             "field_a",
             forms.CharField(label="Field a", initial=default_value),
         )],
         required=False,
     )
     self.assertEquals(default_value,
                       multi_field.clean_sub_fields("")["field_a"])