aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/methods.py
diff options
context:
space:
mode:
authorCarles Barrobés2011-06-25 12:35:17 +0200
committerCarles Barrobés2011-06-25 12:35:17 +0200
commit0626b618ad0d3c5f8fbb6ab3facce440647fb3c0 (patch)
tree516e67b1bfebd4e4dbb9fed4f3dc11fee0afde3a /djangorestframework/tests/methods.py
parentfc1640de75511006e89f033c9270ec91a9f1e4d4 (diff)
downloaddjango-rest-framework-0626b618ad0d3c5f8fbb6ab3facce440647fb3c0.tar.bz2
Support for HEAD method
Diffstat (limited to 'djangorestframework/tests/methods.py')
-rw-r--r--djangorestframework/tests/methods.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/djangorestframework/tests/methods.py b/djangorestframework/tests/methods.py
index d8f0d919..c3a3a28d 100644
--- a/djangorestframework/tests/methods.py
+++ b/djangorestframework/tests/methods.py
@@ -24,3 +24,9 @@ class TestMethodOverloading(TestCase):
view = RequestMixin()
view.request = self.req.post('/', {view._METHOD_PARAM: 'DELETE'})
self.assertEqual(view.method, 'DELETE')
+
+ def test_HEAD_is_a_valid_method(self):
+ """HEAD requests identified"""
+ view = RequestMixin()
+ view.request = self.req.head('/')
+ self.assertEqual(view.method, 'HEAD')