bdauvergne / python-oath

Python implementation of HOTP, TOTP and OCRA algorithms from OATH
BSD 3-Clause "New" or "Revised" License
128 stars 35 forks source link

Usage Examples #2

Closed atkinson closed 13 years ago

atkinson commented 13 years ago

Hi there. I'm interested in testing the TOTP implementation.

Would it be possible to add some comments to the tests.py file to explain what is going on?

thanks so much.

atkinson commented 13 years ago

Never mind, I figured it out.

One suggestion, in accept_totp it might be better to compare totp == str(response), or at least throwing an exception if response isn't a string.

Just a suggestion as at the moment it 'fails silently'.

Cheers Rich