Esempio n. 1
0
def test_donor_letter_witout():
    '''test the note writing function without a current donation'''
    alex = Donor('Alex', [100])
    output = ("Dear Alex,\n\nThank you for your generosity to our cause.\nYou "
              "have now given a total of $100.\nWe greatly appreciate "
              "your contributions!\n\nThank you!\nAlex Laws")
    assert alex.write_note() == output
Esempio n. 2
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