aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/test.py
diff options
context:
space:
mode:
authorDanilo Bargen2014-05-30 17:53:26 +0200
committerDanilo Bargen2014-05-30 17:53:26 +0200
commit6cb6bfae1b83c8682fa3c3d208c732c8ea49606e (patch)
tree43f47b9f53b5f6a3150a5032f491e3fa50b083e4 /rest_framework/test.py
parenta7ff51118f8c8d696219ea7723b283a0ee680457 (diff)
downloaddjango-rest-framework-6cb6bfae1b83c8682fa3c3d208c732c8ea49606e.tar.bz2
Always use specified content type in APIRequestFactory
If `content_type` is specified in the `APIRequestFactory`, always include it in the request, even if data is empty.
Diffstat (limited to 'rest_framework/test.py')
-rw-r--r--rest_framework/test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/test.py b/rest_framework/test.py
index df5a5b3b..284bcee0 100644
--- a/rest_framework/test.py
+++ b/rest_framework/test.py
@@ -36,7 +36,7 @@ class APIRequestFactory(DjangoRequestFactory):
"""
if not data:
- return ('', None)
+ return ('', content_type)
assert format is None or content_type is None, (
'You may not set both `format` and `content_type`.'