From 826d76a8c7969e2ae91fe83fb077deb0329bafb1 Mon Sep 17 00:00:00 2001 From: Hamish Campbell Date: Mon, 8 Sep 2014 12:16:20 +1200 Subject: [PATCH] Stop the API Client converting empty lists/dicts to empty strings --- rest_framework/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/test.py b/rest_framework/test.py index f89a6dcd0..9b40353a3 100644 --- a/rest_framework/test.py +++ b/rest_framework/test.py @@ -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, (