Stop the API Client converting empty lists/dicts to empty strings

This commit is contained in:
Hamish Campbell 2014-09-08 12:16:20 +12:00
parent d4d7739574
commit 826d76a8c7

View File

@ -36,7 +36,7 @@ class APIRequestFactory(DjangoRequestFactory):
Encode the data returning a two tuple of (bytes, content_type)
"""
if not data:
if data is None:
return ('', content_type)
assert format is None or content_type is None, (