mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[1.7.x] Fixed #22337: FileSystemStorage marked as deconstructible and tested.
This commit is contained in:
@@ -3,6 +3,7 @@ import warnings
|
||||
from django.db import models
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils import six
|
||||
from django.core.files.storage import FileSystemStorage
|
||||
|
||||
|
||||
class FieldDeconstructionTests(TestCase):
|
||||
@@ -141,6 +142,7 @@ class FieldDeconstructionTests(TestCase):
|
||||
self.assertEqual(path, "django.db.models.FileField")
|
||||
self.assertEqual(args, [])
|
||||
self.assertEqual(kwargs, {"upload_to": "foo/bar"})
|
||||
# Test max_length
|
||||
field = models.FileField(upload_to="foo/bar", max_length=200)
|
||||
name, path, args, kwargs = field.deconstruct()
|
||||
self.assertEqual(path, "django.db.models.FileField")
|
||||
|
||||
Reference in New Issue
Block a user