#---------------------------------------------------------------------------------------------------------# print "(=) Testing findContact function" 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)