@@ -0,0 +1,1005 @@
+import unittest%0Aimport binascii%0Aimport struct%0Aimport yubi_goog%0A%0Aclass TestYubiGoog(unittest.TestCase):%0A    def setUp(self):%0A        self.google_secret = %22n xu7 v4s qp6 njs gj5%22%0A        self.test_secret = binascii.hexlify('12345678901234567890'.encode('ascii'))%0A        self.test_vectors = %5B%7B 'time': 1111111111, 'otp': '050471' %7D,%0A                             %7B 'time': 1234567890, 'otp': '005924' %7D,%0A                             %7B 'time': 2000000000, 'otp': '279037' %7D %5D%0A%0A    def test_decode_secret(self):%0A        decoded = yubi_goog.decode_secret(self.google_secret).upper()%0A        self.assertEqual(decoded, %226DE9FAF2507F9A99193D%22.encode('ascii'))%0A%0A    def test_totp(self):%0A        for pair in self.test_vectors:%0A            time = pair%5B'time'%5D%0A            real_otp = pair%5B'otp'%5D%0A%0A            tm = int(int(time)/30)%0A            tm = struct.pack('%3Eq', tm)%0A            otp = yubi_goog.totp(self.test_secret, tm)%0A            self.assertEqual(otp, real_otp)%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

add unit tests