mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
test content_type query param override
This commit is contained in:
parent
664021a9b7
commit
b06a1061f0
|
@ -71,6 +71,10 @@ class TestMethodOverloading(TestCase):
|
||||||
request = Request(factory.get('/', {'foo': 'bar'}, HTTP_X_HTTP_METHOD_OVERRIDE='DELETE'))
|
request = Request(factory.get('/', {'foo': 'bar'}, HTTP_X_HTTP_METHOD_OVERRIDE='DELETE'))
|
||||||
self.assertEqual(request.method, 'DELETE')
|
self.assertEqual(request.method, 'DELETE')
|
||||||
|
|
||||||
|
def test_content_type_override_query(self):
|
||||||
|
request = Request(factory.post('/?content_type=application/x-www-form-urlencoded', HTTP_CONTENT_TYPE='text/plain'), {'email': 'mmmmmm@test.com'})
|
||||||
|
self.assertEqual(request.content_type, 'application/x-www-form-urlencoded')
|
||||||
|
|
||||||
|
|
||||||
class TestContentParsing(TestCase):
|
class TestContentParsing(TestCase):
|
||||||
def test_standard_behaviour_determines_no_content_GET(self):
|
def test_standard_behaviour_determines_no_content_GET(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user