In Django, when I run "manage.py test", I get a lot of authentication related failures. Some examples:
FAIL: test_password_change_succeeds -- AssertionError 200 != 302
FAIL: Logout without next_page option renders the default template -- AssertionError 200 != 302
And:
Failed example:
form.non_field_errors()
Expected:
[u'This account is inactive.']
Got:
[u'Please enter correct username and password....']
I've configured settings.py so that Django will accept authentication from Apache2. In settings, MIDDLEWARE_CLASSES
includes 'AuthenticationMiddleware' and 'RemoteUserMiddleware', and AUTHENTICATION_BACKENDS
includes 'RemoteUserBackend'.
How do I figure out the problem here?
UPDATE 2 I cleared the test errors by commenting out the setting of AUTHENTICATION_BACKENDS. Now I have to think about the authentication state I need in my test environment, but at least I've cleared this issue.
The first update had a reference to a question I've since deleted.