Ticket #25942: test.patch

File test.patch, 722 bytes (added by Arthur Vuillard, 7 years ago)

Unit test

  • tests/forms_tests/tests/test_fields.py

    diff --git a/tests/forms_tests/tests/test_fields.py b/tests/forms_tests/tests/test_fields.py
    index 9606246..35bfc56 100644
    a b class FieldsTests(SimpleTestCase): 
    12761276            f.clean, '3'
    12771277        )
    12781278
     1279    def test_typedchoicefield_has_changed_no_coerce(self):
     1280        choices = [('', '---------'), ('1', 'Choice 1'), ('2', 'Choice 2')]
     1281        f = TypedChoiceField(choices=choices, initial=None, required=False, empty_value=None)
     1282        self.assertFalse(f.has_changed(None, ''))
     1283
    12791284    # NullBooleanField ############################################################
    12801285
    12811286    def test_nullbooleanfield_1(self):
Back to Top