Commit 91cd824c by Kevin McDermott

Tests for this with broken test.

parent 5858c943
......@@ -76,7 +76,7 @@ if getattr(settings, 'OPENID_USE_AS_ADMIN_LOGIN', False):
def _openid_login(self, request, error_message='', extra_context=None):
if request.user.is_authenticated():
if not request.user.is_staff:
return views.render_failure(
return views.default_render_failure(
request, "User %s does not have admin access."
% request.user.username)
return views.render_failure(
......
......@@ -30,11 +30,12 @@ import unittest
from test_views import *
from test_store import *
from test_auth import *
from test_admin import *
def suite():
suite = unittest.TestSuite()
for name in ['test_auth', 'test_store', 'test_views']:
for name in ['test_auth', 'test_store', 'test_views', 'test_admin']:
mod = __import__('%s.%s' % (__name__, name), {}, {}, ['suite'])
suite.addTest(mod.suite())
return suite
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment