def test_AuthselectScannerLibrary_step_detect_profile__nis(mock_service): pam = get_config(''' auth sufficient pam_unix.so auth required pam_deny.so ''') obj = AuthselectScannerLibrary([], Authconfig(''), DConf(''), PAM(pam), '') mock_service.return_value = True assert obj.step_detect_profile() == 'nis'
def test_AuthselectScannerLibrary_step_detect_profile__sssd_winbind( mock_service): pam = get_config(''' auth sufficient pam_unix.so auth sufficient pam_winbind.so auth sufficient pam_sss.so auth required pam_deny.so ''') obj = AuthselectScannerLibrary([], Authconfig(''), DConf(''), PAM(pam), '') mock_service.return_value = False assert obj.step_detect_profile() is None
def test_AuthselectScannerLibrary_step_detect_profile__None(mock_service): obj = AuthselectScannerLibrary([], Authconfig(''), DConf(''), PAM(''), '') mock_service.return_value = False assert obj.step_detect_profile() is None