def test_over_18_is_adult(self): """Make sure someone over 18 is considered an adult.""" rule = MustBeAdultRule(self.session) self.assertTrue(rule.match())
def test_under_18_is_rejected(self): """Make sure someone under 18 is NOT considered an adult.""" self.session.customer.age = 13 rule = MustBeAdultRule(self.session) self.assertFalse(rule.match())
def test_exactly_18_is_adult(self): """Make sure someone exactly 18 is considered an adult.""" self.session.customer.age = 18 rule = MustBeAdultRule(self.session) self.assertTrue(rule.match())