mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-20 05:20:56 +03:00
Merge pull request #1608 from dbrgn/test_client_contenttype
Always use specified content type in APIRequestFactory
This commit is contained in:
commit
12394c9cac
|
@ -36,7 +36,7 @@ class APIRequestFactory(DjangoRequestFactory):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
return ('', None)
|
return ('', content_type)
|
||||||
|
|
||||||
assert format is None or content_type is None, (
|
assert format is None or content_type is None, (
|
||||||
'You may not set both `format` and `content_type`.'
|
'You may not set both `format` and `content_type`.'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user