aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_fields.py
diff options
context:
space:
mode:
authorTom Christie2014-10-08 16:59:52 +0100
committerTom Christie2014-10-08 16:59:52 +0100
commit5ead8dc89d1a99d6189170dc8dac19cdc8ba7750 (patch)
treefb6dd48b39ff2000f69d28524c6748725d329668 /tests/test_fields.py
parent4c015df28cfb7dc7cf29f6dc4985c57e1f5cdc5d (diff)
downloaddjango-rest-framework-5ead8dc89d1a99d6189170dc8dac19cdc8ba7750.tar.bz2
Support empty file fields
Diffstat (limited to 'tests/test_fields.py')
-rw-r--r--tests/test_fields.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_fields.py b/tests/test_fields.py
index bbd9f93d..eaa0a3c8 100644
--- a/tests/test_fields.py
+++ b/tests/test_fields.py
@@ -879,7 +879,8 @@ class TestFileField(FieldValues):
(MockFile(name='x' * 100, size=10), ['Ensure this filename has at most 10 characters (it has 100).'])
]
outputs = [
- (MockFile(name='example.txt', url='/example.txt'), '/example.txt')
+ (MockFile(name='example.txt', url='/example.txt'), '/example.txt'),
+ ('', None)
]
field = fields.FileField(max_length=10)