mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 13:14:30 +03:00
corrected request example
This commit is contained in:
parent
ab0b72a7c1
commit
8b72b7bf92
|
@ -66,8 +66,6 @@ class TestMethodOverloading(RequestTestCase):
|
||||||
|
|
||||||
|
|
||||||
class TestContentParsing(RequestTestCase):
|
class TestContentParsing(RequestTestCase):
|
||||||
#TODO: is there any reason why many test cases documented as testing a PUT,
|
|
||||||
# in fact use a POST !?
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
request_class.parsers = ()
|
request_class.parsers = ()
|
||||||
|
@ -115,7 +113,7 @@ class TestContentParsing(RequestTestCase):
|
||||||
content = 'qwerty'
|
content = 'qwerty'
|
||||||
content_type = 'text/plain'
|
content_type = 'text/plain'
|
||||||
request_class.parsers = (PlainTextParser,)
|
request_class.parsers = (PlainTextParser,)
|
||||||
request = self.build_request('post', '/', content, content_type=content_type)
|
request = self.build_request('put', '/', content, content_type=content_type)
|
||||||
self.assertEqual(request.DATA, content)
|
self.assertEqual(request.DATA, content)
|
||||||
|
|
||||||
def test_overloaded_behaviour_allows_content_tunnelling(self):
|
def test_overloaded_behaviour_allows_content_tunnelling(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user