summaryrefslogtreecommitdiff
path: root/tests/model_fields/test_booleanfield.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_fields/test_booleanfield.py')
-rw-r--r--tests/model_fields/test_booleanfield.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/model_fields/test_booleanfield.py b/tests/model_fields/test_booleanfield.py
index 30eb009eb7..d0ed6e86cc 100644
--- a/tests/model_fields/test_booleanfield.py
+++ b/tests/model_fields/test_booleanfield.py
@@ -1,6 +1,7 @@
from django import forms
from django.core.exceptions import ValidationError
from django.db import IntegrityError, models, transaction
+from django.db.models.utils import get_blank_choice_label
from django.test import SimpleTestCase, TestCase
from .models import BooleanModel, FksToBooleans, NullBooleanModel
@@ -48,7 +49,9 @@ class BooleanFieldTests(TestCase):
"""
choices = [(1, "Si"), (2, "No")]
f = models.BooleanField(choices=choices)
- self.assertEqual(f.formfield().choices, [("", "---------")] + choices)
+ self.assertEqual(
+ f.formfield().choices, [("", get_blank_choice_label())] + choices
+ )
def test_nullbooleanfield_formfield(self):
f = models.BooleanField(null=True)