예제 #1
0
 def test_age_not_in_range_is_denied(self):
     """Make sure an age that falls outside of range is invalid."""
     rule = MustHaveAgeRangeRule(self.session, range=[60, 70])
     self.assertFalse(rule.match())
예제 #2
0
 def test_age_in_range_is_accepted(self):
     """Make sure an age that falls in the range is valid."""
     rule = MustHaveAgeRangeRule(self.session, range=[18, 35])
     self.assertTrue(rule.match())