1
0
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:
Andrew Godwin
2014-05-06 22:23:23 -07:00
parent a75318e813
commit f53d1576ca
3 changed files with 21 additions and 0 deletions

View File

@@ -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")