def test_6(self): self.assertIsNone(check_donation('Ralph Anders', 300)) self.assertIn(300, mailroom4.donors_list['Ralph Anders'])
def test_7(self): self.assertIsNone(check_donation('New Donor', 400.56)) self.assertIn(400.56, mailroom4.donors_list['New Donor'])
def test_4(self): self.assertFalse(check_donation('New Donor', 'quit'))
def test_5(self): self.assertTrue(check_donation('New Donor', 'Non-number'))
def test_06_check_donation_existing_donor(self): self.assertIsNone(check_donation('Ralph Anders', 300))
def test_08_check_donation_new_donor(self): self.assertIsNone(check_donation('New Donor', 400.56))
def test_05_check_donation_is_non_number(self): self.assertTrue(check_donation('New Donor', 'Non-number'))
def test_04_check_donation_is_quit(self): self.assertFalse(check_donation('New Donor', 'quit'))
def test_check_donation_number_return(): result = mr.check_donation("200.33") assert result == 200.33
def test_check_negative_donation(): with pytest.raises(ValueError): mr.check_donation(-123)
def test_check_donation(): with pytest.raises(ValueError): mr.check_donation(0)