Skip to content

Commit

Permalink
Adding one more test to ensure verification works with strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Dhaimade committed Aug 12, 2015
1 parent 38c3e11 commit 5722c4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ def testValidateATimeBasedOTP(self):
with Timecop(1297553958 + 30):
self.assertFalse(totp.verify('102705'))

def testValidateATimeBasedOTPWithDigitLength(self):
totp = pyotp.TOTP('GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ')
with Timecop(1111111111):
self.assertTrue(totp.verify('050471'))
with Timecop(1297553958 + 30):
self.assertFalse(totp.verify('050471'))

def testProvisioningURI(self):
totp = pyotp.TOTP('wrn3pqx5uqxqvnqr')
self.assertEqual(
Expand Down

0 comments on commit 5722c4e

Please sign in to comment.