def test_checkPasswd(): id = "someone not in list" assert not passwd.checkPasswd(id, "passwd") id = "FirebirdAPI" assert not passwd.checkPasswd(id, "incorrectpasswd") id = "FirebirdAPI" assert passwd.checkPasswd(id, "Firebird")
def test_checkPasswd(): id = "someone not in list" assert not passwd.checkPasswd(id,"passwd") id = "FirebirdAPI" assert not passwd.checkPasswd(id,"incorrectpasswd") id = "FirebirdAPI" assert passwd.checkPasswd(id,"Firebird")
def checkPasswd(): web.header('content-type', 'text/html;charset=utf-8', unique=True) data = web.input() if "user" in data and "pw" in data: return passwd.checkPasswd(data.user, data.pw) else: return False
def checkPasswd(): web.header("content-type", "text/html;charset=utf-8", unique=True) data = web.input() if "user" in data and "pw" in data: return passwd.checkPasswd(data.user, data.pw) else: return False
def POST(self,reqtype="html"): username = web.input()["id"] pw = web.input()["pw"] if passwd.checkPasswd(username,pw) == True: global session session.id = username session.pw = pw return renderrouter({"message":{ "login":"******", "id":session.id},"type":reqtype}) else: return renderrouter({"message":errors["wrong_passwd"],"type":reqtype})
def POST(self, reqtype="html"): username = web.input()["id"] pw = web.input()["pw"] if passwd.checkPasswd(username, pw) == True: global session session.id = username session.pw = pw return renderrouter({ "message": { "login": "******", "id": session.id }, "type": reqtype }) else: return renderrouter({ "message": errors["wrong_passwd"], "type": reqtype })
def checkPasswd(): data=web.input() if "user" in data and "pw" in data: return passwd.checkPasswd(data.user,data.pw) else: return False