Exemplo n.º 1
0
 def get_otp_code(self):
     try:
         otp_code = self.otp.get_otp_code()
     except ConfigException:
         self.load_otp(force_new=True)
         otp_code = self.otp.get_otp_code()
     save_otp(self.otp)
     return otp_code
Exemplo n.º 2
0
 def test_otp_config(self):
     otp_config = load_otp(filename=DATA_DIR + "otp_test.bin")
     assert otp_config is not None
     save_otp(otp_config, filename=DATA_DIR + "otp_test2.bin")