def load_otp(self, force_new=False): otp_session = load_otp() if otp_session is None or force_new: logger.error("Please redo otp config") return False self.otp = otp_session return True
def load_otp(self, force_new=False): otp_session = load_otp() if otp_session is None or force_new: self.get_sms_otp_code() otp_session = new_otp_session(otp_session) self.otp = otp_session
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")