Example #1
0
 def test_user_has_one_permission(self):
     environ = make_environ('gustavo',
                            permissions=['watch-tv', 'party', 'eat'])
     p = predicates.has_all_permissions('party', 'scream')
     self.eval_unmet_predicate(
         p, environ, 'The user must have the "scream" permission')
Example #2
0
 def test_user_has_one_permission(self):
     environ = make_environ('gustavo', permissions=['watch-tv', 'party',
                                                    'eat'])
     p = predicates.has_all_permissions('party', 'scream')
     self.eval_unmet_predicate(p, environ,
         'The user must have the "scream" permission')
Example #3
0
 def test_user_has_all_permissions(self):
     environ = make_environ('gustavo',
                            permissions=['watch-tv', 'party', 'eat'])
     p = predicates.has_all_permissions('watch-tv', 'eat')
     self.eval_met_predicate(p, environ)
Example #4
0
 def test_user_has_all_permissions(self):
     environ = make_environ('gustavo', permissions=['watch-tv', 'party',
                                                    'eat'])
     p = predicates.has_all_permissions('watch-tv', 'eat')
     self.eval_met_predicate(p, environ)