diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-06-27 01:19:24 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-06-27 01:19:24 +0200 |
commit | 168ef54e5acfac59f7c625e75a0c7c6d2484cdf0 (patch) | |
tree | 30649368a7fe6db8f1c3c965f598a17ac23a495a /factory/compat.py | |
parent | 77807b4a6bbec59ea98c9f53557ac96239c6300e (diff) | |
download | factory-boy-168ef54e5acfac59f7c625e75a0c7c6d2484cdf0.tar factory-boy-168ef54e5acfac59f7c625e75a0c7c6d2484cdf0.tar.gz |
Add factory.django.ImageField (Closes #52).
Diffstat (limited to 'factory/compat.py')
-rw-r--r-- | factory/compat.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/factory/compat.py b/factory/compat.py index 7c9b845..f77458f 100644 --- a/factory/compat.py +++ b/factory/compat.py @@ -31,10 +31,15 @@ PY2 = (sys.version_info[0] == 2) if PY2: # pragma: no cover def is_string(obj): return isinstance(obj, (str, unicode)) + + from StringIO import StringIO as BytesIO + else: # pragma: no cover def is_string(obj): return isinstance(obj, str) + from io import BytesIO + try: # pragma: no cover # Python >= 3.2 UTC = datetime.timezone.utc |