本文整理匯總了Python中DBManager.DBManager.unassignSession方法的典型用法代碼示例。如果您正苦於以下問題:Python DBManager.unassignSession方法的具體用法?Python DBManager.unassignSession怎麽用?Python DBManager.unassignSession使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.unassignSession方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1:
# 需要導入模塊: from DBManager import DBManager [as 別名]
# 或者: from DBManager.DBManager import unassignSession [as 別名]
byID = db.findContact(cID=contID)
if byID['cID'] == contID:
print "\t(+) Found contact by cID"
else:
print "\t(-) Could not find contact by cID"
#---------------------------------------------------------------------------------------------------------#
byInfo = db.findContact(fName=cont1['fName'], lName=cont1['lName'], email=cont1['email'], sms=cont1['sms'])
if byInfo['cID'] == contID:
print "\t(+) Found contact by information"
else:
print "\t(-) Could not find contact by information"
#---------------------------------------------------------------------------------------------------------#
print "(=) Testing assignSession function"
db.assignSession(ses, fName=cont1['fName'], lName=cont1['lName'], email=cont1['email'], sms=cont1['sms'])
db.printSessions()
db.unassignSession(ses)
#---------------------------------------------------------------------------------------------------------#
print "(=) Testing assignNode function"
db.assignNode(dev1, contID)
db.printNodes()
db.unassignNode(dev1)
#---------------------------------------------------------------------------------------------------------#
print "(=) Printing list of Contacts"
db.printContacts()
#---------------------------------------------------------------------------------------------------------#
print "(=) Cleaning up...."
db.deleteContact(contID)
db.deleteNode(dev1)
db.deleteNode(dev2)
db.deleteSession(ses)
db.close()