Skip to content

Instantly share code, notes, and snippets.

@ericholscher
Created October 20, 2009 03:57
Show Gist options
  • Save ericholscher/213975 to your computer and use it in GitHub Desktop.
Save ericholscher/213975 to your computer and use it in GitHub Desktop.
diff --git a/tests/regressiontests/context_processors/tests.py b/tests/regressiontests/context_processors/tests.py
index 31ecc83..c2f8c4b 100644
--- a/tests/regressiontests/context_processors/tests.py
+++ b/tests/regressiontests/context_processors/tests.py
@@ -72,6 +72,13 @@ class AuthContextProcessorTests(TestCase):
response = self.client.get('/auth_processor_messages/')
self.assertContains(response, "Message 1")
+ def test_user_type(self):
+ self.client.login(username='super', password='secret')
+ response = self.client.get('/auth_processor_messages/')
+ self.assertEqual(str(type(response.context['user'])), "<class 'django.contrib.auth.models.User'>")
+
+
+
def test_user_attrs(self):
"""
Test that ContextLazyObject wraps objects properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment