Ticket #20039: _has_changed_failure.diff

File _has_changed_failure.diff, 726 bytes (added by Florian Apolloner, 12 years ago)
  • tests/forms_tests/tests/fields.py

    diff --git a/tests/forms_tests/tests/fields.py b/tests/forms_tests/tests/fields.py
    index 3d3206e..2c733aa 100644
    a b class FieldsTests(SimpleTestCase):  
    911911        f = TypedChoiceField(choices=[(1, "+1"), (-1, "-1")], coerce=int, required=False, empty_value=None)
    912912        self.assertEqual(None, f.clean(''))
    913913
     914    def test_typedchoicefield_has_changed(self):
     915        f = TypedChoiceField(choices=[(1, "+1"), (-1, "-1")], coerce=int, required=True)
     916        self.assertFalse(f._has_changed(None, ''))
     917
    914918    # NullBooleanField ############################################################
    915919
    916920    def test_nullbooleanfield_1(self):
Back to Top