aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests
diff options
context:
space:
mode:
authorTom Christie2013-12-13 20:40:11 +0000
committerTom Christie2013-12-13 20:40:11 +0000
commitfac6d1a36e39f2fccae77ca49e16c1eb838a51ed (patch)
tree7841a407edb41719e3abcf7af74a6848ce3df142 /rest_framework/tests
parent39dbea4da43f829863d395d5f2ee158837f2afe2 (diff)
parentb86765d9c02388f6bb82dbb5824a005e8fe73dec (diff)
downloaddjango-rest-framework-fac6d1a36e39f2fccae77ca49e16c1eb838a51ed.tar.bz2
Merge branch 'master' of git://github.com/philipforget/django-rest-framework into philipforget-master
Diffstat (limited to 'rest_framework/tests')
-rw-r--r--rest_framework/tests/test_authentication.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/rest_framework/tests/test_authentication.py b/rest_framework/tests/test_authentication.py
index a44813b6..fe11423d 100644
--- a/rest_framework/tests/test_authentication.py
+++ b/rest_framework/tests/test_authentication.py
@@ -362,7 +362,8 @@ class OAuthTests(TestCase):
def test_post_form_with_urlencoded_parameters(self):
"""Ensure POSTing with x-www-form-urlencoded auth parameters passes"""
params = self._create_authorization_url_parameters()
- response = self.csrf_client.post('/oauth/', params)
+ auth = self._create_authorization_header()
+ response = self.csrf_client.post('/oauth/', params, HTTP_AUTHORIZATION=auth)
self.assertEqual(response.status_code, 200)
@unittest.skipUnless(oauth_provider, 'django-oauth-plus not installed')
@@ -424,7 +425,8 @@ class OAuthTests(TestCase):
read_write_access_token.resource.is_readonly = False
read_write_access_token.resource.save()
params = self._create_authorization_url_parameters()
- response = self.csrf_client.post('/oauth-with-scope/', params)
+ auth = self._create_authorization_header()
+ response = self.csrf_client.post('/oauth-with-scope/', params, HTTP_AUTHORIZATION=auth)
self.assertEqual(response.status_code, 200)
@unittest.skipUnless(oauth_provider, 'django-oauth-plus not installed')