Exemplo n.º 1
0
 def test_two_false(self):
     environ = {'test_number': 1}
     p = predicates.Any(EqualsFour(), GreaterThan(3))
     self.eval_unmet_predicate(
         p, environ, "At least one of the following predicates must be "
         "met: Number 1 doesn't equal 4, 1 is not greater "
         "than 3")
Exemplo n.º 2
0
 def test_two_mixed(self):
     environ = {'test_number': 5}
     p = predicates.Any(EqualsFour(), GreaterThan(3))
     self.eval_met_predicate(p, environ)
Exemplo n.º 3
0
 def test_one_false(self):
     environ = {'test_number': 3}
     p = predicates.Any(EqualsTwo())
     self.eval_unmet_predicate(
         p, environ, "At least one of the following predicates must be "
         "met: Number 3 doesn't equal 2")
Exemplo n.º 4
0
 def test_one_true(self):
     environ = {'test_number': 2}
     p = predicates.Any(EqualsTwo())
     self.eval_met_predicate(p, environ)