def factory_contact_model(): """Return a valid contact object with the provided fields.""" contact_info = { 'email': '*****@*****.**', 'phone': '(555) 555-5555', 'phoneExtension': '123' } contact = ContactModel(email=contact_info['email']) contact.save() return contact
def factory_contact_model(contact_info: dict = TestContactInfo.contact1): """Return a valid contact object with the provided fields.""" contact = ContactModel(email=contact_info['email']) contact.save() return contact