def add_contacts(self, contact_name, contact_list): """ :return: add a contact list consisting of new contact details """ try: contact_dict = { "first_name": input("Enter your first name: "), "last_name": input("Enter your last name: "), "address": input("Enter your address: "), "city": input("Enter your city name: "), "state": input("Enter your state name: "), "zip": input("Enter your zip code: "), "phone_number": input("Enter your phone number: "), "email": input("Enter your email: ") } contact = Contacts(contact_dict) contact_list.append(contact) self.contact_book[contact_name] = contact_list except Exception as e: logger.error(e)
def setUp(self): self.c = Contacts("test.db") self.c.populate_database()