コード例 #1
0
def main():
    Username = '******'
    Password = '******'
    Amount = '10'
    F_Username = '******'
    F_Password = '******'
    F_Amount = 'Money'
    print('\n')
    input('Press "Enter" To Run Application Test')
    print('\n')

    print('Username: '******'\nPassword: '******'\n')

    print('Amount: ' + Amount)
    s.deposit(Username, Password, Amount)
    print('\n')

    print('Username: '******'\nPassword: '******'\n')

    print('Amount: ' + F_Amount)
    s.deposit(Username, Password, F_Amount)
    print('\n')
コード例 #2
0
 def on_test_pushButton_clicked(self):
     try:
         service.login(self.getData())
         QtWidgets.QMessageBox.about(
             self, _translate("HkuEditSessionDialog", "success"),
             _translate("HkuEditSessionDialog", "Connect successfully!"))
     except Exception as e:
         QtWidgets.QMessageBox.about(
             self, _translate("HkuEditSessionDialog", "Failed"),
             _translate(
                 "HkuEditSessionDialog",
                 "Failed connect! Please check the host/ip and port\n%s") %
             e)
コード例 #3
0
    def post(self):
        username = self.get_argument('username')
        password = self.get_argument('password')

        self.get_current_user()

        try:
            login(username, password)
        except Exception:
            raise

        self.set_secure_cookie('current_user', username)
        self.redirect('/')
コード例 #4
0
 def handleChange():
     username = ui.usernameInput.text()
     password = ui.pwdInput.text()
     if not username:
         alert(ui.usernameInput, 'Please fill in username!')
         return
     if not password:
         alert(ui.pwdInput, 'Please fill in password!')
         return
     if not check_username_exist(username):
         alert(ui.usernameInput, 'Username does not exist.', True)
         ui.pwdInput.setText('')
         return
     user = login(username, encode(password))
     if not user:
         alert(ui.pwdInput, 'Incorrect Password!', True)
         return
     mainWindow.showAlert(
         f'Hello, {username}.\n\nPlease enjoy smashing the favorite button!',
         'Message')
     window.close()
     setCurrentUser(mainWindow.ui, user)
コード例 #5
0
def delu():
    user = request.values.get("user")
    password = request.values.get("password")
    return str(login(user, password))
コード例 #6
0
ファイル: index.py プロジェクト: Romniva/profile
def login():
    req_json = request.get_json(silent=True)
    login = req_json['login']
    password = req_json['password']
    return jsonify(service.login(login, password))
コード例 #7
0
 def login(self, username, password):
     return service.login(username, password)