def test_save(self): newuser = {"firstName": "Stefan", "lastName": "Agner", "eMail": self.testmail, "password": "******"} newuser2 = newuser.copy() useridsave = user.save(newuser) with self.assertRaises(DuplicateKeyError): user.save(newuser2) userdata = user.get(self.testmail) user.remove(self.testmail) self.assertTrue(self.testmail == userdata["eMail"])
def test_save(self): newuser = { "firstName": "Stefan", \ "lastName": "Agner", \ "eMail": self.testmail, \ "password": "******" \ } newuser2 = newuser.copy() useridsave = user.save(newuser) with self.assertRaises(DuplicateKeyError): user.save(newuser2) userdata = user.get(self.testmail) user.remove(self.testmail) self.assertTrue(self.testmail == userdata["eMail"])
def tearDown(self): user.remove(self.testmail)
new_data = user.user_info(uid) if new_data == 0: print("User not found ") continue else: print("Name: {0.name}\tId: {0.id}\tBooks: {0.books}".format( new_data)) while True: print("Scan book id: ") bid = rfid_data.rfid_data() book = hello.get_book(bid) if book == 0: print("Book not found ") else: print( "Book: {0.name}\tAuthor: {0.author}\tId{0.id}\tIssue status: {0.issue}" .format(book)) user.remove(bid, uid) hello.iss_ret("False", bid) c = input("Want to add more book(y/Y)? ") if not (c == 'y' or c == "Y"): break elif op == 3: hello.get_list() elif op == 4: hello.main_get_book() choice = input("Do you want to continue(y/Y): ") if not (choice == 'y' or choice == 'Y'): break