--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/lib/django/contrib/auth/tests/decorators.py Tue May 25 02:43:45 2010 +0200
@@ -0,0 +1,25 @@
+from unittest import TestCase
+
+from django.contrib.auth.decorators import login_required
+
+
+class LoginRequiredTestCase(TestCase):
+ """
+ Tests the login_required decorators
+ """
+ def testCallable(self):
+ """
+ Check that login_required is assignable to callable objects.
+ """
+ class CallableView(object):
+ def __call__(self, *args, **kwargs):
+ pass
+ login_required(CallableView())
+
+ def testView(self):
+ """
+ Check that login_required is assignable to normal views.
+ """
+ def normal_view(request):
+ pass
+ login_required(normal_view)
\ No newline at end of file