mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.
This commit is contained in:
parent
06eec31970
commit
d992f4e3c2
34 changed files with 49 additions and 183 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue