@then('the new contact list is equal to the old contact list with the added contact')
def verify_contact_added(db, contact_list, new_contact):
    old_contacts = contact_list
    new_contacts = db.get_contact_list()
    old_contacts.append(new_contact)
    assert (sorted(old_contacts, key=Contact.id_or_max) == sorted(new_contacts, key=Contact.id_or_max))
@then('the new contact list is equal to the old contact list with the added contact')
def verify_contact_added(db, contact_list, new_contact):
    old_contacts = contact_list
    new_contacts = db.get_contact_list()
    old_contacts.append(new_contact)
    assert (sorted(old_contacts, key=Contact.id_or_max) == sorted(new_contacts, key=Contact.id_or_max))