コード例 #1
0
ファイル: test_pampylho.py プロジェクト: dsoares/pampylho
def test_auth_badpassword():
    with pytest.raises(pampylho.PAMError) as exc_info:
        pampylho.authenticate(getpass.getuser(), 'wrongpassword')

    e = exc_info.value
    assert 'Unknown' not in str(e)
コード例 #2
0
ファイル: test_pampylho.py プロジェクト: dsoares/pampylho
def test_auth_nouser():
    with pytest.raises(pampylho.PAMError) as exc_info:
        pampylho.authenticate('userdoesntexist', 'wrongpassword')
    
    e = exc_info.value
    assert 'Unknown' not in str(e)