本文整理汇总了Python中auth.Auth.doLogin方法的典型用法代码示例。如果您正苦于以下问题:Python Auth.doLogin方法的具体用法?Python Auth.doLogin怎么用?Python Auth.doLogin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth.Auth
的用法示例。
在下文中一共展示了Auth.doLogin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_accept
# 需要导入模块: from auth import Auth [as 别名]
# 或者: from auth.Auth import doLogin [as 别名]
def on_accept(self):
auth = Auth()
if auth.doLogin(str(self.userNameLineEdit.text()), str(self.passwordLineEdit.text())):
self.setResult(self.Success)
else:
msgBox = QMessageBox(self)
msgBox.setIcon(QMessageBox.Warning)
msgBox.setWindowTitle(_translate("LoginDialog", "PAT Login message", None))
msgBox.setText(_translate("LoginDialog", "Either incorrect username and/or password. Try again!", None))
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec_()
self.setResult(self.Failed)
示例2: onAccept
# 需要导入模块: from auth import Auth [as 别名]
# 或者: from auth.Auth import doLogin [as 别名]
def onAccept(self):
auth = Auth()
if auth.doLogin(self.txtUsername.text(), self.txtPassword.text()):
self.setResult(self.Success)
else:
msgBox = QMessageBox(self)
msgBox.setIcon(QMessageBox.Warning)
msgBox.setWindowTitle(_translate("LoginDialog", "Pythonthusiast", None))
msgBox.setText(_translate("LoginDialog", "Either incorrect username and/or password. Try again!", None))
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec_()
self.setResult(self.Failed)
示例3: testAuth
# 需要导入模块: from auth import Auth [as 别名]
# 或者: from auth.Auth import doLogin [as 别名]
def testAuth(self):
helper.dbConnect()
auth = Auth()
self.assertEqual(auth.doLogin("eko", "password"), True)
示例4: testAuth
# 需要导入模块: from auth import Auth [as 别名]
# 或者: from auth.Auth import doLogin [as 别名]
def testAuth(self):
auth = Auth()
self.assertEqual(auth.doLogin("eko", "oke"), True)
示例5: testAuth
# 需要导入模块: from auth import Auth [as 别名]
# 或者: from auth.Auth import doLogin [as 别名]
def testAuth(self):
qApp = QCoreApplication(sys.argv)
helper.dbConnect()
auth = Auth()
self.assertEqual(auth.doLogin("eko", "password"), True)