summaryrefslogtreecommitdiff
path: root/factory
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-15 16:24:10 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-15 16:24:10 +0200
commitae3e8e67490a80c5f7cf405fe8ee7cddedb8c7a9 (patch)
tree99f5db6ac5a5b322492f846cb36e18b688199aef /factory
parenta24e2b945166cdd32ece9bf2cab21280974143cb (diff)
downloadfactory-boy-ae3e8e67490a80c5f7cf405fe8ee7cddedb8c7a9.tar
factory-boy-ae3e8e67490a80c5f7cf405fe8ee7cddedb8c7a9.tar.gz
Fix FileField (bytes instead of str)
Diffstat (limited to 'factory')
-rw-r--r--factory/django.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/django.py b/factory/django.py
index e0a744a..7182be6 100644
--- a/factory/django.py
+++ b/factory/django.py
@@ -142,7 +142,7 @@ class FileField(declarations.PostGenerationDeclaration):
path = content.name
else:
- data = params.get('data', '')
+ data = params.get('data', b'')
content = django_files.base.ContentFile(data)
if path: