def test_call_menu_function_205(): donation_choices = alt_choices.copy() donation_choices.pop('list') assert m.call_menu_function(donation_choices, 'fdasfd', m.add_donation, donor_name='C. N. Enome') == False
def test_call_menu_function_201(): donation_choices = alt_choices.copy() donation_choices.pop('list') assert m.call_menu_function(donation_choices, 'quit', m.add_donation, donor_name='C. N. Enome') == True
def test_call_menu_function_202(): donation_choices = alt_choices.copy() donation_choices.pop('list') assert m.call_menu_function(donation_choices, '50', m.add_donation, donor_name='C. N. Enome') == False del m.donor_history['C. N. Enome'] # restore dict for next tests
def test_call_menu_function_200(): # re-use the donor name dict, except without the 'list' function donation_choices = alt_choices.copy() donation_choices.pop('list') assert m.call_menu_function(donation_choices, '', m.add_donation, donor_name='C. N. Enome') == True
def test_call_menu_function_8(): assert m.call_menu_function(choices, '', m.respond_to_bad_main_menu_choice) == False
def test_call_menu_function_5(): assert m.call_menu_function(choices, '4', m.respond_to_bad_main_menu_choice) == True
def test_call_menu_function_4(): with pytest.raises(IOError): m.call_menu_function(choices, '3', m.respond_to_bad_main_menu_choice)
def test_call_menu_function_104(): # An I/O error occurs because the function prompts for donation amt with pytest.raises(IOError): m.call_menu_function(alt_choices, 'Papa Smurf', m.get_donation_amount)
def test_call_menu_function_102(): assert m.call_menu_function(alt_choices, 'list', m.get_donation_amount) == True