aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/request.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/tests/request.py')
-rw-r--r--rest_framework/tests/request.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rest_framework/tests/request.py b/rest_framework/tests/request.py
index 2eb34cea..1f05ff8f 100644
--- a/rest_framework/tests/request.py
+++ b/rest_framework/tests/request.py
@@ -303,3 +303,11 @@ class TestUserSetter(TestCase):
self.assertFalse(self.request.user.is_anonymous())
logout(self.request)
self.assertTrue(self.request.user.is_anonymous())
+
+
+class TestAuthSetter(TestCase):
+
+ def test_auth_can_be_set(self):
+ request = Request(factory.get('/'))
+ request.auth = 'DUMMY'
+ self.assertEqual(request.auth, 'DUMMY')