def test_userid_fail(self): auth = scss.check_pw('test-user', 'test-password-1234') api_key = scss.get_api_key('test-user', auth) api_status = scss.check_api_key(api_key) test = scss.check_userid(api_status, api_key, '*****@*****.**') assert test is False
def test_mfa(self): auth = scss.check_pw('test-user', 'test-password-1234') api_key = scss.get_api_key('test-user', auth) otp = TOTP('2UVQE7LDNU5XZWANIDTJA43W6I').now() test = scss.check_totp(otp, api_key) assert test is True
def test_api_key_format(self): auth = scss.check_pw('test-user', 'test-password-1234') apikey = scss.get_api_key('test-user', auth) test = validate_api_key(apikey) assert test is True
def test_api_auth(self): auth = scss.check_pw('test-user', 'test-password-1234') api_key = scss.get_api_key('test-user', auth) test = scss.check_api_key(api_key) assert test is True
def test_api_retrieval(self): auth = scss.check_pw('test-user', 'test-password-1234') test = scss.get_api_key('test-user', auth) assert test is not False