def test_add_donor(): # Test for existing donor mailroom.add_donor('John Jacob') assert mailroom.donors['John Jacob'] == [5.00, 1000.00, 4.25] # Test for new donor mailroom.add_donor('Emory') assert mailroom.donors['Emory'] == []
def test_add_donor3(): """Test if new donor is in database.""" add_donor('kyle test') assert 'Kyle Test' in db.keys()
def test_add_donor2(): """Test check for existing donor name in database. Message text.""" assert add_donor('callum fuller') == ('Callum Fuller', '\nFound donor ' 'Callum Fuller in database.')
def test_add_donor1(): """Test addition of new donor to database. Message text.""" assert add_donor('kyle test') == ('Kyle Test', '\nAdding donor to database : Kyle Test')
def test_donor_exists(self): mailroom_pt4.add_donor("Michael Jordan", 200) self.assertListEqual(mailroom_pt4.donor_dict.get("Michael Jordan"), [1300, 200])
def test_add_donor(self): mailroom_pt4.add_donor("Billy Bob", 2345) self.assertEqual(mailroom_pt4.donor_dict.get("Billy Bob"), [2345])