'Verify that check_password returns the correct values as per
http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms#Apache_Authentication_Provider'

@skipIfCustomUser
def test_check_password(self):

    User.objects.create_user(u'test', u'test@example.com', u'test')
    self.assertTrue((check_password({}, u'unknown', u'') is None))
    self.assertTrue(check_password({}, u'test', u'test'))
    User.objects.filter(username=u'test').update(is_active=False)
    self.assertFalse(check_password({}, u'test', u'test'))
    self.assertFalse(check_password({}, u'test', u'incorrect'))
