예제 #1
0
 def test_item(self):
     acl = self.dummy_acl()
     item = acl(request="foo")["item-id"]
     assert item.id == "item-id"
     assert isinstance(item, acl.item_model)
예제 #2
0
 def test_inherit_acl(self):
     acl = self.dummy_acl()
     item = acl(request="foo")["name"]
     assert getattr(item, "__acl__", None) == None
예제 #3
0
 def test_default_acl(self):
     acl = self.dummy_acl()
     obj = acl(request="foo")
     assert obj.__acl__ == (("Allow", "g:admin", ALL_PERMISSIONS),)
예제 #4
0
 def test_item(self):
     acl = self.dummy_acl()
     item = acl(request='foo')['item-id']
     assert item.id == 'item-id'
     assert isinstance(item, acl.item_model)
예제 #5
0
 def test_inherit_acl(self):
     acl = self.dummy_acl()
     item = acl(request='foo')['name']
     assert getattr(item, '__acl__', None) == None
예제 #6
0
 def test_default_acl(self):
     acl = self.dummy_acl()
     obj = acl(request='foo')
     assert obj.__acl__ == (('Allow', 'g:admin', ALL_PERMISSIONS),)