Example #1
0
 def test_closest_secured_no_secured(self):
     parent = Mock(securedBy=None, parentResource=None)
     resource = Mock(securedBy=None, parentResource=parent)
     assert utils.closest_secured_by(resource) == []
Example #2
0
 def test_closest_secured_by_parent(self):
     parent = Mock(securedBy=['foo'])
     resource = Mock(securedBy=None, parentResource=parent)
     assert utils.closest_secured_by(resource) == ['foo']