def test_donor_init():
    d = Donor('William Gates III')
    assert d.name == 'William Gates III'
    assert d.donations == []
    d.add_donations(2000)
    d.add_donations(3000)
    assert d.total_donations == 5000
def test_donorDB():
    d = Donor('Paul Allen')
    d.add_donations(6000)
    d2 = Donor('Shigeru Miamoto')
    d2.add_donations(9000)
    db = DonorDB()
    db.add_donor(d)
    db.add_donor(d2)
    assert db.database_dict == {
        'Paul Allen': [6000],
        'Shigeru Miamoto': [9000]
    }
from mailroom_oo import Donor, DonorDB

d = Donor('Paul Allen')
d.add_donations(6000)
d2 = Donor('Shigeru Miamoto')
d2.add_donations(9000)
db_test = DonorDB()
db_test.add_donor(d)
db_test.add_donor(d2)


def test_donor_init():
    d = Donor('William Gates III')
    assert d.name == 'William Gates III'
    assert d.donations == []
    d.add_donations(2000)
    d.add_donations(3000)
    assert d.total_donations == 5000


def test_donorDB():
    d = Donor('Paul Allen')
    d.add_donations(6000)
    d2 = Donor('Shigeru Miamoto')
    d2.add_donations(9000)
    db = DonorDB()
    db.add_donor(d)
    db.add_donor(d2)
    assert db.database_dict == {
        'Paul Allen': [6000],
        'Shigeru Miamoto': [9000]