def test_create_report():
    # add a new donor and check that they are in report
    mailroom.add_new_donation('New Donor', 23.00)
    report = mailroom.create_report()
    assert ('New Donor', 23.0, 1, 23.0) in report
    # verify average donation
    assert report[0][1]/report[0][2] == report[0][3]
示例#2
0
def test_create_report():
    # add a new donor and check that they are in report
    mailroom.add_new_donation('New Donor', 23.00)
    report = mailroom.create_report()
    assert ('New Donor', 23.0, 1, 23.0) in report
    # verify average donation
    assert report[0][1] / report[0][2] == report[0][3]
def test_add_new_donation():
    # new donation for existing donor
    mailroom.add_new_donation('Ringo Starr', 1.00)
    assert mailroom.donors['Ringo Starr'][-1] == 1.00
    # add new donor
    mailroom.add_new_donation('Bob Dylan', 10000.00)
    assert mailroom.donors['Bob Dylan'][0] == 10000.00
示例#4
0
def test_add_new_donation():
    # new donation for existing donor
    mailroom.add_new_donation('Ringo Starr', 1.00)
    assert mailroom.donors['Ringo Starr'][-1] == 1.00
    # add new donor
    mailroom.add_new_donation('Bob Dylan', 10000.00)
    assert mailroom.donors['Bob Dylan'][0] == 10000.00