def test_remove_existing_patient(): um = UserManager() um.add_patient_by_info('*****@*****.**', 'password', 'Cena', 'John', '04253634223') assert (len(um.patients) == 1) assert (um.patients[0].email == '*****@*****.**') assert (um.get_user('*****@*****.**') is not None) assert (um.remove_patient('*****@*****.**')) assert (um.patients == []) assert (um.get_service_names() == [])
def test_remove_non_existing_patient_from_empty_list(): um = UserManager() assert (not um.remove_patient('*****@*****.**')) assert (um.patients == [])
def test_remove_non_existing_patient(): um = UserManager() um.add_patient_by_info('*****@*****.**', 'password', 'Cena', 'John', '04253634223') assert (not um.remove_patient('*****@*****.**')) assert (um.patients[0].email == '*****@*****.**')