def test_add_and_remove_new_donor(): mailroom.donors_dict = donors_dict donor = 'Test Monkey' donor_donation = 123456789.10 mailroom.add_donation(donor, donor_donation) assert mailroom.retrieve_donation(donor) == [donor_donation] assert mailroom.delete_donor(donor) == [donor_donation]
def test_add_donation(): name = "Randal Root" donation = "500" mailroom.add_donation(donors, name, donation) assert donors['Randal Root']
def test_add_donation(): m.add_donation('Elmer Fudd', 14, test_donors) assert 'Elmer Fudd' in test_donors assert test_donors['Elmer Fudd'][-1] == 14
def test_add_donation_to_existing_donor(): mailroom.donors_dict = donors_dict donor = 'War Machine' donor_donation = 10 mailroom.add_donation(donor, donor_donation) assert mailroom.retrieve_donation(donor) == [10, 10, 10]
def test_add_donation(): add_donation('Frank Reynolds', 1000) assert donor_list['Frank Reynolds'] == [10, 20, 50, 1000]
def test_add_new_donor(): donations = {"Chris": [10.00, 20.00, 100.00]} mr.add_donation("Joe", 100.00, donations) assert donations["Joe"][0] == 100.00
def test_add_donation_to_existing_donor(): donations = {"Chris": [10.00, 20.00, 100.00]} mr.add_donation("Chris", 15.15, donations) assert donations["Chris"][-1] == 15.15
def test_add_donation(self): mailroom.add_donation('x', 1, mailroom.donors) self.assertEqual(mailroom.donors['x'][0], 1)