Example #1
0
def test_donor_letter_with():
    '''test the note writing function with a current donation'''
    alex = Donor('Alex', [100])
    alex.new_donation(500)
    output = ("Dear Alex,\n\nThank you for your generosity to our cause.\nYour"
              " recent gift of $500 is very helpful. You have now given a "
              "total of $600.\nWe greatly appreciate your contributions!"
              "\n\nThank you!\nAlex Laws")
    assert alex.write_note(500) == output
Example #2
0
def test_donor_new_donation():
    alex = Donor('Alex', [100])
    alex.new_donation(300)
    assert alex.donations == [100, 300]