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'))
Example #5
0
 def test_06_check_donation_existing_donor(self):
     self.assertIsNone(check_donation('Ralph Anders', 300))
Example #6
0
 def test_08_check_donation_new_donor(self):
     self.assertIsNone(check_donation('New Donor', 400.56))
Example #7
0
 def test_05_check_donation_is_non_number(self):
     self.assertTrue(check_donation('New Donor', 'Non-number'))
Example #8
0
 def test_04_check_donation_is_quit(self):
     self.assertFalse(check_donation('New Donor', 'quit'))
Example #9
0
def test_check_donation_number_return():
    result = mr.check_donation("200.33")

    assert result == 200.33
Example #10
0
def test_check_negative_donation():
    with pytest.raises(ValueError):
        mr.check_donation(-123)
Example #11
0
def test_check_donation():
    with pytest.raises(ValueError):
        mr.check_donation(0)