          # field is required, but the form is valid because the field is excluded from
          # the form. This is for backwards compatibility.
  
          form = PriceFormWithoutQuantity({'price': '6.00'})
          self.assertEqual(form.is_valid(), True)
          price = form.save(commit=False)
          with self.assertRaises(ValidationError):
              price.full_clean()
  
          # The form should not validate fields that it doesn't contain even if they are
 
</s> remove         self.assertEqual(f.is_valid(), True)
 </s> add         self.assertTrue(f.is_valid()) </s> remove         self.assertEqual(form.is_valid(), True)
 </s> add         self.assertTrue(form.is_valid()) </s> remove         self.assertEqual(form.instance.quantity is None, True)
        self.assertEqual(form.instance.pk is None, True)
 </s> add         self.assertIsNone(form.instance.quantity)
        self.assertIsNone(form.instance.pk) </s> remove         constraint should be ignored."""
 </s> add         constraint should be ignored.
        """
        class DateTimePostForm(forms.ModelForm):
            class Meta:
                model = DateTimePost
                fields = '__all__'
 </s> remove </select></td></tr>''' % (w_woodward.pk, w_royko.pk, c1.pk, c2.pk, c3.pk))

        # You can restrict a form to a subset of the complete list of fields
        # by providing a 'fields' argument. If you try to save a
        # model created with such a form, you need to ensure that the fields
        # that are _not_ on the form have default values, or are allowed to have
        # a value of None. If a field isn't specified on a form, the object created
        # from the form can't provide a value for that field!
        f = PartialArticleForm(auto_id=False)
        self.assertHTMLEqual(six.text_type(f), '''<tr><th>Headline:</th><td><input type="text" name="headline" maxlength="50" /></td></tr>
<tr><th>Pub date:</th><td><input type="text" name="pub_date" /></td></tr>''')
 </s> add </select></td></tr>''' % (self.w_woodward.pk, self.w_royko.pk, self.c1.pk, self.c2.pk, self.c3.pk))
        self.assertTrue(form.is_valid())
          # field is required, but the form is valid because the field is excluded from
          # the form. This is for backwards compatibility.
  
          form = PriceFormWithoutQuantity({'price': '6.00'})
        self.assertTrue(form.is_valid())
          price = form.save(commit=False)
          with self.assertRaises(ValidationError):
              price.full_clean()
  
          # The form should not validate fields that it doesn't contain even if they are
keep keep keep keep replace keep keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py