Used assertIs(…, True) in model_forms.tests.ValidationTest.

This commit is contained in:
Jon Dufresne 2020-05-18 00:25:26 -07:00 committed by GitHub
parent 7070d46114
commit 3b1cb78063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -873,15 +873,15 @@ class IncompleteCategoryFormWithExclude(forms.ModelForm):
class ValidationTest(SimpleTestCase):
def test_validates_with_replaced_field_not_specified(self):
form = IncompleteCategoryFormWithFields(data={'name': 'some name', 'slug': 'some-slug'})
assert form.is_valid()
self.assertIs(form.is_valid(), True)
def test_validates_with_replaced_field_excluded(self):
form = IncompleteCategoryFormWithExclude(data={'name': 'some name', 'slug': 'some-slug'})
assert form.is_valid()
self.assertIs(form.is_valid(), True)
def test_notrequired_overrides_notblank(self):
form = CustomWriterForm({})
assert form.is_valid()
self.assertIs(form.is_valid(), True)
class UniqueTest(TestCase):