Merge pull request #1608 from dbrgn/test_client_contenttype

Always use specified content type in APIRequestFactory
This commit is contained in:
Tom Christie 2014-05-30 19:31:06 +01:00
commit 12394c9cac

View File

@ -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`.'