Ignore:
Timestamp:
21 Aug 2013, 21:08:11 (11 years ago)
Author:
Henrik Bettermann
Message:

Be more verbose if credentials checking fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py

    r10518 r10522  
    190190        if username == 'fault5' and password == 'biz':
    191191            return {'type': 'applicant'}
     192        if username == 'fault6' and password == 'biz':
     193            return {'type': 'boss'}
    192194        return None
    193195
     
    351353        assert result1a == (True, '')
    352354        result2s = auth.check_credentials('SCHOOL1-foo', 'bar')
    353         assert result2s == (
    354             False, 'Invalid username or password or user not eligible.')
     355        assert result2s == (False, 'Invalid username or password')
    355356        result3s = auth.check_credentials('SCHOOL2-bar', 'baz')
    356         assert result3s == (
    357             False, 'Invalid username or password or user not eligible.')
     357        assert result3s == (False, 'Invalid username or password')
     358        result8 = auth.check_credentials('SCHOOL1-fault6', 'biz')
     359        assert result8 == (False, 'User not eligible')
    358360
    359361        # exceptions are raised in the follwoing cases
Note: See TracChangeset for help on using the changeset viewer.