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

TOTP doesn't seem to be working #4

Closed sharoonthomas closed 12 years ago

sharoonthomas commented 12 years ago

And the test case does truth testing at:

https://github.com/bdauvergne/python-oath/blob/master/tests/totp.py#L69

which will always be true since the accept_totp always returns a tuple and the tuple's length is always greater than 0.

sharoonthomas commented 12 years ago
>>> bool((False, 0))
True 
>>> bool((True, 0))
True 
>>> bool(())
False