aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/methods.py
diff options
context:
space:
mode:
authorTom Christie2011-06-25 14:53:48 +0100
committerTom Christie2011-06-25 14:53:48 +0100
commitd3557bdcd0f4d6a7106267ea0f8a3024f21fd9f9 (patch)
tree05c49fa0f7d78721cad77656e1952553380420ac /djangorestframework/tests/methods.py
parent50efa106529e03eda5607e6c9323838432ce755f (diff)
parent0626b618ad0d3c5f8fbb6ab3facce440647fb3c0 (diff)
downloaddjango-rest-framework-d3557bdcd0f4d6a7106267ea0f8a3024f21fd9f9.tar.bz2
Allow 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')