mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #28937 -- Allowed BinaryField to be editable=True.
This commit is contained in:
committed by
Tim Graham
parent
9f7772e098
commit
622ead6aaf
@@ -1,4 +1,5 @@
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import DataModel
|
||||
@@ -25,3 +26,11 @@ class BinaryFieldTests(TestCase):
|
||||
dm = DataModel(short_data=self.binary_data * 4)
|
||||
with self.assertRaises(ValidationError):
|
||||
dm.full_clean()
|
||||
|
||||
def test_editable(self):
|
||||
field = models.BinaryField()
|
||||
self.assertIs(field.editable, False)
|
||||
field = models.BinaryField(editable=True)
|
||||
self.assertIs(field.editable, True)
|
||||
field = models.BinaryField(editable=False)
|
||||
self.assertIs(field.editable, False)
|
||||
|
||||
Reference in New Issue
Block a user