Beispiel #1
0
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() == [])
Beispiel #2
0
def test_remove_non_existing_patient_from_empty_list():
    um = UserManager()
    assert (not um.remove_patient('*****@*****.**'))
    assert (um.patients == [])
Beispiel #3
0
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 == '*****@*****.**')