def test_OATH_HOTP_validation(self):

        oath = lambda counter, user_code, look_ahead: \
            pyhsm.oath_hotp.search_for_oath_code(self.hsm, self.key_handle, self.nonce, self.aead, \
                                                     counter, user_code, look_ahead)

        self.assertEqual(1,	oath(0, 755224, 1))
        self.assertEqual(4,	oath(0, 969429, 4))
        self.assertEqual(None,	oath(0, 969429, 3))
        self.assertEqual(10,	oath(9, 520489, 3))
        self.assertEqual(31,    oath(30, 26920, 1))
Test complete OATH HOTP code validation.
dataset/ETHPy150Open Yubico/python-pyhsm/test/test_oath.py/TestOath.test_OATH_HOTP_validation