def test_donor_challenge(): kf = m6.Donor('Kristian Francisco', [5, 1000, 100]) dh = m6.DonorHandler() dh.add_donor(kf) dh2 = dh.dnr_challenge(factor=4, min_donation=10, max_donation=1000) # print(dh2.donors['Kristian Francisco'].donations) assert dh2.donors['Kristian Francisco'].donations == [400]
def test_donor_handle(): clear_donations('Kristian Francisco') kf = m6.Donor('Kristian Francisco', [1000, 100]) dh = m6.DonorHandler() dh.add_donor(kf) assert 'Kristian Francisco' in dh.donors assert dh.donors['Kristian Francisco'].donations == [1000, 100] clear_donations('Kristian Francisco')
def test_donor_projection(): kf = m6.Donor('Kristian Francisco', [20, 1000, 100]) dh = m6.DonorHandler() dh.add_donor(kf) prj_1 = dh.dnr_projections('Kristian Francisco', factor=4, min_donation=10, max_donation=1000) assert prj_1 == 480
def test_donor_challenge(): clear_donations('Kristian Francisco') clear_donations('Kristian Francisco Projection') kf = m6.Donor('Kristian Francisco', [5, 1000, 100]) dh = m6.DonorHandler() dh.add_donor(kf) dh2 = dh.dnr_challenge(factor=4, min_donation=10, max_donation=1000) print(dh2.donors['Kristian Francisco Projection'].donations) assert dh2.donors['Kristian Francisco Projection'].donations == [400] # assert False clear_donations('Kristian Francisco') clear_donations('Kristian Francisco Projection')