Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.

This commit is contained in:
Mariusz Felisiak 2021-01-13 21:28:09 +01:00
parent 06eec31970
commit d992f4e3c2
34 changed files with 49 additions and 183 deletions

View file

@ -1,7 +1,7 @@
import unittest
from django.db import DatabaseError, connection
from django.db.models import BooleanField, NullBooleanField
from django.db.models import BooleanField
from django.test import TransactionTestCase
from ..models import Square
@ -48,7 +48,7 @@ class Tests(unittest.TestCase):
def test_boolean_constraints(self):
"""Boolean fields have check constraints on their values."""
for field in (BooleanField(), NullBooleanField(), BooleanField(null=True)):
for field in (BooleanField(), BooleanField(null=True)):
with self.subTest(field=field):
field.set_attributes_from_name('is_nice')
self.assertIn('"IS_NICE" IN (0,1)', field.db_check(connection))